posix.cfg: Added missing '<strz/>'-flags

This commit is contained in:
orbitcowboy 2022-06-02 09:41:10 +02:00
parent 63a8eac4d3
commit 0eae0023a3
2 changed files with 101 additions and 2 deletions

View File

@ -416,6 +416,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<not-null/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -518,6 +519,7 @@
<returnValue type="void*"/>
<arg nr="1" direction="in">
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -536,6 +538,7 @@
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<strz/>
</arg>
</function>
<!-- see http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlclose.html -->
@ -673,6 +676,7 @@
<arg nr="1" direction="in">
<not-uninit/>
<not-null/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -704,6 +708,7 @@
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -784,6 +789,7 @@
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<valid>0:</valid>
@ -793,6 +799,7 @@
<arg nr="3" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
</function>
<!-- int symlink(const char *oldpath, const char *newpath); -->
@ -803,11 +810,13 @@
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- int open(const char *pathname, int flags) -->
@ -820,6 +829,7 @@
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -844,6 +854,7 @@
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -862,6 +873,7 @@
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -924,6 +936,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -942,6 +955,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- http://man7.org/linux/man-pages/man2/alarm.2.html -->
@ -1007,6 +1021,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="portability">Non reentrant function 'getprotobyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getprotobyname_r'.</warn>
</function>
@ -1039,10 +1054,12 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="portability">Non reentrant function 'getservbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyname_r'.</warn>
</function>
@ -1059,6 +1076,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="portability">Non reentrant function 'getservbyport' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyport_r'.</warn>
</function>
@ -1080,6 +1098,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="portability">Non reentrant function 'getnetbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getnetbyname_r'.</warn>
</function>
@ -1117,6 +1136,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="style" reason="Obsolescent" alternatives="getaddrinfo"/>
</function>
@ -1129,6 +1149,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1207,6 +1228,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- char *strndup(const char *s, size_t n); -->
@ -1217,6 +1239,7 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
<arg nr="1">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2">
<not-uninit/>
@ -1292,6 +1315,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1306,6 +1330,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1326,6 +1351,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -1346,6 +1372,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -1364,6 +1391,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -1386,6 +1414,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -1409,6 +1438,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- int chdir(const char *path); -->
@ -1420,6 +1450,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- int chroot(const char *path); -->
@ -1431,6 +1462,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- int link(const char *oldpath, const char *newpath); -->
@ -1441,11 +1473,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- int linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); -->
@ -1462,6 +1496,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -1471,6 +1506,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- int unlinkat(int fd, const char *path, int flag); -->
@ -1487,6 +1523,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -1502,6 +1539,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- int stat(const char *file_name, struct stat *buf); -->
@ -1512,6 +1550,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="out">
<not-null/>
@ -1526,6 +1565,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="out">
<not-null/>
@ -1558,6 +1598,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="out">
<not-null/>
@ -1576,6 +1617,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1614,6 +1656,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1631,6 +1674,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1676,6 +1720,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1711,6 +1756,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -1730,6 +1776,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1747,6 +1794,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- DIR *fdopendir(int fd); -->
@ -1780,11 +1828,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2">
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- int pclose(FILE *stream); -->
@ -1936,6 +1986,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -1966,6 +2017,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- long int random(void); -->
@ -2028,11 +2080,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- https://man7.org/linux/man-pages/man3/strncasecmp.3.html -->
@ -2046,10 +2100,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-bool/>
@ -2467,6 +2523,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<arg nr="1" direction="in">
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -2524,6 +2581,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<formatstr/>
<arg nr="2" direction="in">
<formatstr/>
<strz/>
</arg>
<arg nr="any">
<not-uninit/>
@ -2541,6 +2599,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-uninit/>
<formatstr/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -2967,6 +3026,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-uninit/>
<minsize type="argvalue" arg="3"/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -3024,6 +3084,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
<not-bool/>
<minsize type="argvalue" arg="3"/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -3044,6 +3105,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html -->
@ -3130,6 +3192,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -3176,9 +3239,11 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<noreturn>false</noreturn>
<arg nr="1" direction="in">
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -3329,6 +3394,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="portability">Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'.</warn>
</function>
@ -3352,6 +3418,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="inout">
<not-null/>
@ -3367,6 +3434,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-uninit/>
<not-null/>
<strz/>
</arg>
<arg nr="2" direction="out">
<not-null/>
@ -3458,6 +3526,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="4" direction="in">
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/catopen.html -->
@ -3468,6 +3537,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -3560,6 +3630,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
<not-null/>
<minsize type="argvalue" arg="3"/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -3585,6 +3656,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -3621,6 +3693,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -3888,6 +3961,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
</function>
<!-- char *getpass(const char *prompt); -->
@ -3898,6 +3972,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- http://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdlib.h.html -->
@ -3933,10 +4008,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -3950,6 +4027,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- struct tm * localtime(const time_t *tp); -->
@ -4017,6 +4095,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="out">
<not-null/>
@ -4041,6 +4120,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -4050,6 +4130,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="4" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
</function>
<!-- https://man7.org/linux/man-pages/man2/readlink.2.html -->
@ -4066,6 +4147,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="out">
<not-null/>
@ -4394,6 +4476,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -4410,6 +4493,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -4752,6 +4836,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="portability">Non reentrant function 'getspnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getspnam_r'.</warn>
</function>
@ -4786,6 +4871,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="portability">Non reentrant function 'sgetspent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'sgetspent_r'.</warn>
</function>
@ -4869,6 +4955,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<warn severity="portability">Non reentrant function 'getgrnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrnam_r'.</warn>
</function>
@ -4895,6 +4982,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<not-bool/>
<strz/>
</arg>
<arg nr="2" direction="out">
<not-null/>
@ -5022,6 +5110,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-uninit/>
<not-null/>
<strz/>
</arg>
<arg nr="2" direction="out">
<not-bool/>
@ -5070,6 +5159,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2" direction="out">
<not-null/>
@ -5182,6 +5272,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="2"/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -5318,6 +5409,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="1" direction="in">
<not-uninit/>
<not-null/>
<strz/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
@ -5377,6 +5469,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
@ -5431,6 +5524,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
<not-null/>
<not-bool/>
<strz/>
</arg>
</function>
<!-- http://man7.org/linux/man-pages/man2/setitimer.2.html-->
@ -5667,7 +5761,10 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1" direction="out"/>
<arg nr="2" direction="in"/>
<arg nr="2" direction="in">
<not-uninit/>
<strz/>
</arg>
<arg nr="3" direction="in"/>
<arg nr="4" direction="in"/>
<arg nr="5"/>

View File

@ -537,8 +537,10 @@ void bufferAccessOutOfBounds_bzero(void *s, size_t n)
size_t bufferAccessOutOfBounds_strnlen(const char *s, size_t maxlen)
{
char buf[2]={'4','2'};
const char buf[2]={'4','2'};
// cppcheck-suppress invalidFunctionArgStr
size_t len = strnlen(buf,2);
// cppcheck-suppress invalidFunctionArgStr
// cppcheck-suppress bufferAccessOutOfBounds
len+=strnlen(buf,3);
return len;