posix.cfg: Fixes and adding more argument directions.

Fixes: The "length" argument of mmap*() and munmap() calls must be
greater than 0.
This commit is contained in:
versat 2019-03-11 11:20:07 +01:00
parent a4269042e8
commit 7b958e788d
1 changed files with 52 additions and 49 deletions

View File

@ -1310,16 +1310,16 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<!-- ssize_t recv(int sockfd, void *buf, size_t len, int flags); -->
<function name="recv">
<returnValue type="ssize_t"/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="out">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
</arg>
<arg nr="4">
<arg nr="4" direction="in">
<not-uninit/>
<not-bool/>
</arg>
@ -1328,30 +1328,31 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
struct sockaddr *src_addr, socklen_t *addrlen); -->
<function name="recvfrom">
<returnValue type="ssize_t"/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="out">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
</arg>
<arg nr="4">
<arg nr="4" direction="in">
<not-uninit/>
</arg>
<arg nr="5"/>
<arg nr="6">
<arg nr="5" direction="out"/>
<arg nr="6" direction="inout">
<not-bool/>
</arg>
</function>
<!-- ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags); -->
<function name="recvmsg">
<returnValue type="ssize_t"/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="3">
<arg nr="2" direction="inout"/>
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
@ -1359,16 +1360,16 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<!-- ssize_t send(int sockfd, const void *buf, size_t len, int flags); -->
<function name="send">
<returnValue type="ssize_t"/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
</arg>
<arg nr="4">
<arg nr="4" direction="in">
<not-uninit/>
<not-bool/>
</arg>
@ -1377,60 +1378,61 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
const struct sockaddr *dest_addr, socklen_t addrlen); -->
<function name="sendto">
<returnValue type="ssize_t"/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
</arg>
<arg nr="4">
<arg nr="4" direction="in">
<not-uninit/>
</arg>
<arg nr="5"/>
<arg nr="6">
<arg nr="5" direction="in"/>
<arg nr="6" direction="in">
<not-bool/>
</arg>
</function>
<!-- ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags); -->
<function name="sendmsg">
<returnValue type="ssize_t"/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<not-uninit/>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html -->
<!-- void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); -->
<function name="mmap">
<use-retval/>
<returnValue type="void *"/>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<not-uninit/>
<valid>0:</valid>
<valid>1:</valid>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
</arg>
<arg nr="4">
<arg nr="4" direction="in">
<not-uninit/>
</arg>
<arg nr="5">
<arg nr="5" direction="in">
<not-uninit/>
</arg>
<arg nr="6">
<arg nr="6" direction="in">
<not-uninit/>
<not-bool/>
</arg>
@ -1441,39 +1443,40 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<returnValue type="void *"/>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<not-uninit/>
<valid>0:</valid>
<valid>1:</valid>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
</arg>
<arg nr="4">
<arg nr="4" direction="in">
<not-uninit/>
</arg>
<arg nr="5">
<arg nr="5" direction="in">
<not-uninit/>
</arg>
<arg nr="6">
<arg nr="6" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/munmap.html -->
<!-- int munmap(void *addr, size_t length); -->
<function name="munmap">
<returnValue type="int"/>
<noreturn>false</noreturn>
<arg nr="1">
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
<valid>1:</valid>
</arg>
</function>
<!-- void openlog(const char *ident, int option, int facility); -->
@ -1481,13 +1484,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<noreturn>false</noreturn>
<returnValue type="void"/>
<leak-ignore/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<not-uninit/>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
</arg>
</function>
@ -1496,10 +1499,10 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<not-uninit/>
</arg>
<arg nr="any">
@ -1512,10 +1515,10 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<arg nr="1">
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2">
<arg nr="2" direction="in">
<not-uninit/>
</arg>
<arg nr="any">