posix.cfg: Added support for encrypt()

This commit is contained in:
orbitcowboy 2022-12-22 09:19:46 +01:00
parent 7df6ba419e
commit 24a71144f6
2 changed files with 22 additions and 1 deletions

View File

@ -1729,6 +1729,20 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
</arg> </arg>
<warn severity="style" reason="Obsolescent" alternatives="utimensat"/> <warn severity="style" reason="Obsolescent" alternatives="utimensat"/>
</function> </function>
<!-- https://man7.org/linux/man-pages/man3/encrypt.3.html -->
<!-- void encrypt(char block[64], int edflag);-->
<function name="encrypt">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="void"/>
<arg nr="1" direction="in">
<not-null/>
<minsize type="value" value="64" baseType="char"/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
</arg>
</function>
<!-- int futimens(int fd, const struct timespec times[2]);--> <!-- int futimens(int fd, const struct timespec times[2]);-->
<function name="futimens"> <function name="futimens">
<noreturn>false</noreturn> <noreturn>false</noreturn>

View File

@ -24,7 +24,6 @@
#include <netdb.h> #include <netdb.h>
#include <regex.h> #include <regex.h>
#include <time.h> #include <time.h>
#include <unistd.h>
#include <pthread.h> #include <pthread.h>
#include <syslog.h> #include <syslog.h>
#include <stdarg.h> #include <stdarg.h>
@ -32,10 +31,18 @@
#include <stdbool.h> #include <stdbool.h>
#include <mqueue.h> #include <mqueue.h>
#define _XOPEN_SOURCE #define _XOPEN_SOURCE
#include <unistd.h>
#include <wchar.h> #include <wchar.h>
#include <string.h> #include <string.h>
#include <strings.h> #include <strings.h>
void nullPointer_encrypt(char block[64], int edflag)
{
// cppcheck-suppress nullPointer
encrypt(NULL, edflag);
encrypt(block, edflag);
}
int nullPointer_getopt(int argc, char* const argv[], const char* optstring) int nullPointer_getopt(int argc, char* const argv[], const char* optstring)
{ {
// cppcheck-suppress nullPointer // cppcheck-suppress nullPointer