std.cfg: strxfrm(): Added minize values to arg1 and arg2 and a TODO test case
This commit is contained in:
parent
cf211610d3
commit
040e58f943
|
@ -5088,10 +5088,15 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
|
|||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<!-- In case the 3rd argument is 0, the 1st argument is permitted to be a null pointer. (#6306) -->
|
||||
<arg nr="1" direction="out"/>
|
||||
<arg nr="1" direction="out">
|
||||
<strz/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="2" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<strz/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="3" direction="in">
|
||||
<not-uninit/>
|
||||
|
|
|
@ -3550,6 +3550,17 @@ void uninitvar_strxfrm(void)
|
|||
(void)strxfrm(ds,ss,n);
|
||||
}
|
||||
|
||||
void bufferAccessOutOfBounds_strxfrm(void)
|
||||
{
|
||||
const char src[3] = "abc";
|
||||
char dest[1] = "a";
|
||||
(void)strxfrm(dest,src,1);
|
||||
// TODO cppcheck-suppress bufferAccessOutOfBounds
|
||||
(void)strxfrm(dest,src,2);
|
||||
// TODO cppcheck-suppress bufferAccessOutOfBounds
|
||||
(void)strxfrm(dest,src,3);
|
||||
}
|
||||
|
||||
void uninitvar_wcsxfrm(void)
|
||||
{
|
||||
wchar_t *ds;
|
||||
|
|
Loading…
Reference in New Issue