snprintf/g_snprintf: do not allow uninitialized target buffer
This commit is contained in:
parent
cc4a9e2790
commit
e6e3987935
17
cfg/gtk.cfg
17
cfg/gtk.cfg
|
@ -2438,8 +2438,23 @@
|
|||
<noreturn>false</noreturn>
|
||||
</function>
|
||||
<function name="g_snprintf">
|
||||
<leak-ignore/>
|
||||
<returnValue type="int"/>
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
<minsize type="argvalue" arg="2"/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-uninit/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
<formatstr/>
|
||||
<arg nr="3">
|
||||
<formatstr/>
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<function name="g_source_remove">
|
||||
<leak-ignore/>
|
||||
|
|
|
@ -5813,6 +5813,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
|
|||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
<minsize type="argvalue" arg="2"/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
|
|
|
@ -3527,7 +3527,7 @@ void uninitvar_snprintf(char *S, size_t N, char *Format, int Int)
|
|||
(void)snprintf(S,N,format,Int); // format is uninitialized
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)snprintf(S,N,Format,i); // i is uninitialized
|
||||
// TODO cppcheck-suppress uninitvar
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)snprintf(s,N,Format,Int);
|
||||
|
||||
// no warning is expected for
|
||||
|
|
Loading…
Reference in New Issue