From ed54b933174d8ed0cbd62887cc10383932250046 Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Fri, 18 Apr 2014 21:46:32 +0200 Subject: [PATCH] Fixed FP in posix.cfg and mkdir() for second parameter. --- cfg/posix.cfg | 2 +- test/testnullpointer.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index 20f224947..78e6452b1 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -16,7 +16,7 @@ false - + false diff --git a/test/testnullpointer.cpp b/test/testnullpointer.cpp index 8f5f74716..56692c523 100644 --- a/test/testnullpointer.cpp +++ b/test/testnullpointer.cpp @@ -2605,6 +2605,15 @@ private: check("void f(){ isatty (0);}"); ASSERT_EQUALS("",errout.str()); + + check("void f(char *p){ mkdir (p, 0);}"); + ASSERT_EQUALS("",errout.str()); + + check("void f(char *p){ int i = 0; mkdir (p, i);}"); + ASSERT_EQUALS("",errout.str()); + + check("void f(char *p){ mkdir (p, *0);}"); + ASSERT_EQUALS("[test.cpp:1]: (error) Null pointer dereference\n",errout.str()); } };