Fix: A potential null_pointer_deference bug
PR 30954 * ldlang.c (map_input_to_output_sections): Check that os is non NULL before using it.
This commit is contained in:
parent
cb0f1baf44
commit
ee1cb49e5a
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2023-10-09 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 30954
|
||||
* ldlang.c (map_input_to_output_sections): Check that os is non
|
||||
NULL before using it.
|
||||
|
||||
2023-10-05 A. Wilcox <awilfox@adelielinux.org>
|
||||
|
||||
PR 30905
|
||||
|
|
|
@ -4198,6 +4198,9 @@ map_input_to_output_sections
|
|||
os);
|
||||
break;
|
||||
case lang_data_statement_enum:
|
||||
if (os == NULL)
|
||||
/* This should never happen. */
|
||||
FAIL ();
|
||||
/* Make sure that any sections mentioned in the expression
|
||||
are initialized. */
|
||||
exp_init_os (s->data_statement.exp);
|
||||
|
|
Loading…
Add table
Reference in a new issue