posix.cfg: Added overlapping data check for stpcpy().
This commit is contained in:
parent
d782cd629a
commit
01b68b99c6
|
@ -3889,6 +3889,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
|||
<returnValue type="char *"/>
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" strlen-arg="2"/>
|
||||
<arg nr="1" direction="out">
|
||||
<not-null/>
|
||||
<minsize type="strlen" arg="2"/>
|
||||
|
|
|
@ -29,6 +29,14 @@
|
|||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
char * overlappingWriteFunction_stpcpy(char *src, char *dest)
|
||||
{
|
||||
// No warning shall be shown:
|
||||
(void) stpcpy(dest, src);
|
||||
// cppcheck-suppress overlappingWriteFunction
|
||||
return stpcpy(src, src);
|
||||
}
|
||||
|
||||
void overlappingWriteFunction_bcopy(char *buf, const size_t count)
|
||||
{
|
||||
// No warning shall be shown:
|
||||
|
|
Loading…
Reference in New Issue