posix.cfg: Add minsize to readlink[at] function configurations (#1216)
This commit is contained in:
parent
c39e3467a4
commit
50aa3620da
|
@ -2443,6 +2443,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
|||
</arg>
|
||||
<arg nr="2">
|
||||
<not-null/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="3">
|
||||
<not-uninit/>
|
||||
|
@ -2464,6 +2465,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
|||
</arg>
|
||||
<arg nr="3">
|
||||
<not-null/>
|
||||
<minsize type="argvalue" arg="4"/>
|
||||
</arg>
|
||||
<arg nr="4">
|
||||
<not-uninit/>
|
||||
|
|
|
@ -42,6 +42,12 @@ void bufferAccessOutOfBounds(int fd)
|
|||
sendto(fd,a,6,0,0x0,0x0);
|
||||
// cppcheck-suppress constStatement
|
||||
0;
|
||||
readlink("path", a, 5);
|
||||
// cppcheck-suppress bufferAccessOutOfBounds
|
||||
readlink("path", a, 6);
|
||||
readlinkat(1, "path", a, 5);
|
||||
// cppcheck-suppress bufferAccessOutOfBounds
|
||||
readlinkat(1, "path", a, 6);
|
||||
}
|
||||
|
||||
void nullPointer(char *p, int fd)
|
||||
|
|
Loading…
Reference in New Issue