mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-09 14:40:54 +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)
|
if (frame->type != type)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (frame->len > (self->len - self->pos))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
self->pos += frame->len;
|
self->pos += frame->len;
|
||||||
|
|
||||||
return frame;
|
return frame;
|
||||||
|
|||||||
Reference in New Issue
Block a user