imsm: Fix possible segfault in check_no_platform()
PATCH 1/1 imsm: Fix possible segfault in check_no_platform()
conf_line() may return NULL, which is not handled and might cause segfault.
Signed-off-by Mateusz Grzonka <[email protected]>
--- super-intel.c | 5 +++++ 1 file changed, 5 insertions(+)
super-intel.c +5 -0
@@ -650,6 +650,11 @@ static int check_no_platform(void)char *l =conf_line (fp);char *w = l; +if (l ==NULL ) { +fclose (fp); +return 0 ; + } + do { if (strcmp(w, search) == 0) no_platform = 1;
Signature · 1 line
2.26.2
Jes Sorensen
AppliedQuoted 7 lines · Mateusz Grzonka
conf_line()may return NULL, which is not handled and might cause segfault.Signed-off-by Mateusz Grzonka <[email protected]>--- super-intel.c | 5 +++++ 1 file changed, 5 insertions(+)
Applied!
Thanks,
Jes