diff --git a/src/detection/cpu/cpu_linux.c b/src/detection/cpu/cpu_linux.c index 8f33c491e..227af12bb 100644 --- a/src/detection/cpu/cpu_linux.c +++ b/src/detection/cpu/cpu_linux.c @@ -191,6 +191,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) ffStrbufAppendS(&cpu->vendor, pstart); } pstart = pend + 1; + if (pstart >= buffer.chars + buffer.length) + return NULL; } } } @@ -222,6 +224,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) } pstart = pend + 1; + if (pstart >= buffer.chars + buffer.length) + return NULL; } } }