diff --git a/src/detection/terminalfont/terminalfont.c b/src/detection/terminalfont/terminalfont.c index 18fc8eec7..63e0a6fc0 100644 --- a/src/detection/terminalfont/terminalfont.c +++ b/src/detection/terminalfont/terminalfont.c @@ -271,7 +271,7 @@ static bool queryKittyTerm(const char* query, FFstrbuf* res) for (const char* p = buffer; p[0] && p[1]; p += 2) { unsigned value; - if (sscanf(p, "%2x", &value)) + if (sscanf(p, "%2x", &value) == 1) ffStrbufAppendC(res, (char) value); } return true; diff --git a/src/detection/terminalshell/terminalshell.c b/src/detection/terminalshell/terminalshell.c index e0246ea37..28bd7c591 100644 --- a/src/detection/terminalshell/terminalshell.c +++ b/src/detection/terminalshell/terminalshell.c @@ -490,7 +490,7 @@ static bool getTerminalVersionKitty(FFstrbuf* exe, FFstrbuf* version) for (const char* p = versionHex; p[0] && p[1]; p += 2) { unsigned value; - if (sscanf(p, "%2x", &value)) + if (sscanf(p, "%2x", &value) == 1) ffStrbufAppendC(version, (char) value); } return true;