Fix #9345 FP wrongPrintfScanfArgNum for vasprintf

Configuration "<formatstr/>" for function is wrong, for the argument it
is fine.
This commit is contained in:
versat 2019-09-09 15:02:55 +02:00
parent 32eb6e1b19
commit 7737a448cf
2 changed files with 9 additions and 3 deletions

View File

@ -351,13 +351,13 @@
<arg nr="1" direction="out">
<not-null/>
</arg>
<formatstr/>
<arg nr="2" direction="in">
<formatstr/>
<not-uninit/>
</arg>
<arg nr="3">
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- http://man7.org/linux/man-pages/man2/accept.2.html -->

View File

@ -11,6 +11,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
#include <sys/time.h>
#ifndef __CYGWIN__
#include <sys/epoll.h>
@ -87,7 +88,7 @@ int no_resourceLeak_mkostemp_02(char *template, int flags)
return mkostemp(template, flags);
}
void valid_code(int argInt1)
void valid_code(int argInt1, va_list valist_arg)
{
char *p;
@ -111,6 +112,11 @@ void valid_code(int argInt1)
__builtin_prefetch(p, 0, 1);
if (__builtin_types_compatible_p(int, char)) {}
char * pStr = NULL;
if (vasprintf(&pStr, "%d %d", valist_arg) != -1) {
free(pStr);
}
}
void ignoreleak(void)