Fixed #3096 (false negative: memory leak not found when passing string to strtok)
This commit is contained in:
parent
812a17f294
commit
84f190abf7
|
@ -71,7 +71,7 @@ static const char * const call_func_white_list[] =
|
|||
, "setbuf", "setbuffer", "sethostname", "setlinebuf", "setlocale" ,"setvbuf", "sizeof" ,"snprintf", "sprintf", "sscanf"
|
||||
, "stat", "stpcpy", "strcasecmp", "strcat", "strchr", "strcmp", "strcoll"
|
||||
, "strcpy", "strcspn", "strdup", "stricmp", "strlen", "strncasecmp", "strncat", "strncmp"
|
||||
, "strncpy", "strpbrk","strrchr", "strspn", "strstr", "strtod", "strtol", "strtoul", "strxfrm", "switch"
|
||||
, "strncpy", "strpbrk","strrchr", "strspn", "strstr", "strtod", "strtok", "strtol", "strtoul", "strxfrm", "switch"
|
||||
, "symlink", "sync_file_range", "system", "telldir", "tempnam", "time", "typeid", "unlink"
|
||||
, "utime", "utimes", "vasprintf", "vfprintf", "vfscanf", "vprintf"
|
||||
, "vscanf", "vsnprintf", "vsprintf", "vsscanf", "while", "wordexp","write", "writev"
|
||||
|
|
|
@ -599,11 +599,14 @@ private:
|
|||
, "getservbyname", "getservbyport", "glob", "index", "inet_addr", "inet_aton", "inet_network"
|
||||
, "initgroups", "link", "mblen", "mbstowcs", "mbtowc", "mkdir", "mkfifo", "mknod", "obstack_printf"
|
||||
, "obstack_vprintf", "opendir", "parse_printf_format", "pathconf", "popen", "psignal", "putenv"
|
||||
, "readlink", "regcomp", "strxfrm", "wordexp", "sizeof"
|
||||
, "readlink", "regcomp", "strxfrm", "wordexp", "sizeof", "strtok"
|
||||
};
|
||||
|
||||
for (unsigned int i = 0; i < (sizeof(call_func_white_list) / sizeof(char *)); ++i)
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list(call_func_white_list[i]));
|
||||
{
|
||||
bool ret = CheckMemoryLeakInFunction::test_white_list(call_func_white_list[i]);
|
||||
ASSERT_EQUALS("", ret ? "" : call_func_white_list[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue