mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
ubsan: member access within null pointer of union
Add some nonsense to cover "undefined behaviour". * ldlang.c (section_for_dot): Avoid UB.
This commit is contained in:
@@ -6726,7 +6726,7 @@ section_for_dot (void)
|
||||
if (stmt->header.type == lang_output_section_statement_enum)
|
||||
break;
|
||||
|
||||
os = &stmt->output_section_statement;
|
||||
os = stmt ? &stmt->output_section_statement : NULL;
|
||||
while (os != NULL
|
||||
&& !os->after_end
|
||||
&& (os->bfd_section == NULL
|
||||
|
||||
Reference in New Issue
Block a user