diff --git a/src/detection/terminalshell/terminalshell.c b/src/detection/terminalshell/terminalshell.c index 911b34dfb..97cb9c3ef 100644 --- a/src/detection/terminalshell/terminalshell.c +++ b/src/detection/terminalshell/terminalshell.c @@ -89,7 +89,8 @@ static bool getShellVersionFish(FFstrbuf* exe, FFstrbuf* version) { if (version->length < strlen("fish, v") || !ffStrbufStartsWithS(version, "fish")) { return false; } - uint32_t index = ffStrbufNextIndexC(version, strlen("fish, "), ' '); + uint32_t index = ffStrbufFirstIndexC(version, ' '); // skip "fish," + index = ffStrbufNextIndexC(version, index + 1, ' '); // skip "version" ffStrbufSubstrAfter(version, index); ffStrbufSubstrBeforeFirstC(version, ' '); return true;