Correct configuration to allow NULL as 2nd argument to read/write. Whether it's a legal value depends on the 3rd argument

This commit is contained in:
Alexander Mai 2017-04-29 17:57:16 +02:00
parent 980ca39fe2
commit 14be611a7e
2 changed files with 4 additions and 4 deletions

View File

@ -1059,7 +1059,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
<arg nr="2">
<not-null/>
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
@ -1076,7 +1075,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="2">
<not-uninit/>
<not-null/>
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">

View File

@ -56,10 +56,12 @@ void nullPointer(char *p, int fd)
// cppcheck-suppress nullPointer
// cppcheck-suppress utimeCalled
utime(NULL, NULL);
// cppcheck-suppress nullPointer
// not implemented yet: cppcheck-suppress nullPointer
read(fd,NULL,42);
// cppcheck-suppress nullPointer
read(fd,NULL,0);
// not implemented yet: cppcheck-suppress nullPointer
write(fd,NULL,42);
write(fd,NULL,0);
}
void memleak_getaddrinfo()