binutils/SOURCES/binutils-CVE-2018-12699-part3-PR22957.patch

14 lines
498 B
Diff

diff -rup binutils.orig.2/binutils/stabs.c binutils-2.30/binutils/stabs.c
--- binutils.orig.2/binutils/stabs.c 2024-10-29 14:21:27.910212960 +0000
+++ binutils-2.30/binutils/stabs.c 2024-10-29 14:22:14.304336367 +0000
@@ -3364,6 +3363,9 @@ pop_bincl (struct stab_handle *info)
return info->main_filename;
info->bincl_stack = o->next_stack;
+ if (o->file >= info->files)
+ return info->main_filename;
+
o->file_types = info->file_types[o->file];
if (info->bincl_stack == NULL)