#6100 False positive nullPointer - calling mbstowcs(NULL,). wcstombs has also been fixed
This commit is contained in:
parent
eeeb8aa0a7
commit
3aeecb8a05
|
@ -197,14 +197,14 @@
|
||||||
<function name="mbstowcs">
|
<function name="mbstowcs">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<leak-ignore/>
|
<leak-ignore/>
|
||||||
<arg nr="1"><not-null/></arg>
|
<arg nr="1"><not-uninit/></arg>
|
||||||
<arg nr="2"><not-null/><not-uninit/></arg>
|
<arg nr="2"><not-null/><not-uninit/></arg>
|
||||||
<arg nr="3"><not-uninit/></arg>
|
<arg nr="3"><not-uninit/></arg>
|
||||||
</function>
|
</function>
|
||||||
<function name="wcstombs">
|
<function name="wcstombs">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<leak-ignore/>
|
<leak-ignore/>
|
||||||
<arg nr="1"><not-null/></arg>
|
<arg nr="1"><not-uninit/></arg>
|
||||||
<arg nr="2"><not-null/><not-uninit/></arg>
|
<arg nr="2"><not-null/><not-uninit/></arg>
|
||||||
<arg nr="3"><not-uninit/></arg>
|
<arg nr="3"><not-uninit/></arg>
|
||||||
</function>
|
</function>
|
||||||
|
|
|
@ -2562,6 +2562,12 @@ private:
|
||||||
|
|
||||||
check("void f(char * p,char * q){ strtol (p,q,0);if(!p){}}");
|
check("void f(char * p,char * q){ strtol (p,q,0);if(!p){}}");
|
||||||
ASSERT_EQUALS(errp,errout.str());
|
ASSERT_EQUALS(errp,errout.str());
|
||||||
|
|
||||||
|
// #6100 False positive nullPointer - calling mbstowcs(NULL,)
|
||||||
|
check("size_t get (char *value) { return mbstowcs (NULL, value, 0); }");
|
||||||
|
ASSERT_EQUALS("",errout.str());
|
||||||
|
check("size_t get (wchar_t *value) { return wcstombs (NULL, value, 0); }");
|
||||||
|
ASSERT_EQUALS("",errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void nullpointerFputc() {
|
void nullpointerFputc() {
|
||||||
|
|
Loading…
Reference in New Issue