mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 08:00:53 +00:00
Merge branch 'gbsneto/fix-rpi4-crash' into 'master'
details-page: Protect against NULL line See merge request GNOME/sysprof!20
This commit is contained in:
@ -142,8 +142,12 @@ cpu_info_cb (const SysprofCaptureFrame *frame,
|
|||||||
const gchar *line;
|
const gchar *line;
|
||||||
gchar **str = user_data;
|
gchar **str = user_data;
|
||||||
|
|
||||||
endptr = (gchar *)fc->data + fc->len;
|
|
||||||
line = memmem ((gchar *)fc->data, fc->len, "model name", 10);
|
line = memmem ((gchar *)fc->data, fc->len, "model name", 10);
|
||||||
|
|
||||||
|
if (!line)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
endptr = (gchar *)fc->data + fc->len;
|
||||||
endptr = memchr (line, '\n', endptr - line);
|
endptr = memchr (line, '\n', endptr - line);
|
||||||
|
|
||||||
if (endptr)
|
if (endptr)
|
||||||
|
|||||||
Reference in New Issue
Block a user