posix.cfg: Do not allow the second parameter of read and write to be a NULL pointer.
This commit is contained in:
parent
89532cf8b9
commit
0b6c726439
|
@ -1059,6 +1059,7 @@ 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">
|
||||
|
@ -1075,6 +1076,7 @@ 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">
|
||||
|
|
|
@ -44,7 +44,7 @@ void bufferAccessOutOfBounds(int fd)
|
|||
0;
|
||||
}
|
||||
|
||||
void nullPointer(char *p)
|
||||
void nullPointer(char *p, int fd)
|
||||
{
|
||||
// cppcheck-suppress ignoredReturnValue
|
||||
isatty(0);
|
||||
|
@ -56,6 +56,10 @@ void nullPointer(char *p)
|
|||
// cppcheck-suppress nullPointer
|
||||
// cppcheck-suppress utimeCalled
|
||||
utime(NULL, NULL);
|
||||
// cppcheck-suppress nullPointer
|
||||
read(fd,NULL,42);
|
||||
// cppcheck-suppress nullPointer
|
||||
write(fd,NULL,42);
|
||||
}
|
||||
|
||||
void memleak_getaddrinfo()
|
||||
|
|
Loading…
Reference in New Issue