mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: check frame length overruns
If we got a corrupted frame, just stop reading forward immediately.
This commit is contained in:
@ -491,6 +491,9 @@ sysprof_capture_reader_read_basic (SysprofCaptureReader *self,
|
||||
if (frame->type != type)
|
||||
return NULL;
|
||||
|
||||
if (frame->len > (self->len - self->pos))
|
||||
return NULL;
|
||||
|
||||
self->pos += frame->len;
|
||||
|
||||
return frame;
|
||||
|
||||
Reference in New Issue
Block a user