std.cfg: Ensure a warning is issued for null pointer input for strlen().
This commit is contained in:
parent
3bd65d42cd
commit
49057543a1
|
@ -381,6 +381,13 @@ void nullpointer(int value)
|
||||||
wscanf(L"%i", NULL);
|
wscanf(L"%i", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t nullPointer_strlen(const char *s)
|
||||||
|
{
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void) strlen(NULL);
|
||||||
|
return strlen(s);
|
||||||
|
}
|
||||||
|
|
||||||
void nullpointerMemchr1(char *p, char *s)
|
void nullpointerMemchr1(char *p, char *s)
|
||||||
{
|
{
|
||||||
p = memchr(s, 'p', strlen(s));
|
p = memchr(s, 'p', strlen(s));
|
||||||
|
|
Loading…
Reference in New Issue