Skip to content

Commit de66ed4

Browse files
committed
Added missing message to --errorlist output, changed Id to avoid duplicate
1 parent a6da71e commit de66ed4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

lib/checkio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ void CheckIO::invalidScanfError(const Token *tok, bool portability)
392392
{
393393
if (portability)
394394
reportError(tok, Severity::portability,
395-
"invalidscanf", "scanf without field width limits can crash with huge input data on some versions of libc.\n"
395+
"invalidscanf_libc", "scanf without field width limits can crash with huge input data on some versions of libc.\n"
396396
"scanf without field width limits can crash with huge input data on libc versions older than 2.13-25. Add a field "
397397
"width specifier to fix this problem:\n"
398398
" %i => %3i\n"

lib/checkio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class CPPCHECKLIB CheckIO : public Check {
133133
c.useClosedFileError(0);
134134
c.seekOnAppendedFileError(0);
135135
c.invalidScanfError(0, false);
136+
c.invalidScanfError(0, true);
136137
c.wrongPrintfScanfArgumentsError(0,"printf",3,2);
137138
c.invalidScanfArgTypeError_s(0, 1, "s", NULL);
138139
c.invalidScanfArgTypeError_int(0, 1, "d", NULL, false);

0 commit comments

Comments
 (0)