blob: fedc4fa7f37dbb6c20129d6730a00bd665476f38 (
plain) (
tree)
|
|
Author: marxin
Date: Tue Jul 23 07:33:32 2019 UTC
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=273718
libiberty: Check zero value shstrndx in simple-object-elf.c
--- trunk/libiberty/simple-object-elf.c 2019/07/23 07:31:50 273717
+++ trunk/libiberty/simple-object-elf.c 2019/07/23 07:33:32 273718
@@ -548,7 +548,15 @@
XDELETE (eor);
return NULL;
}
-
+
+ if (eor->shstrndx == 0)
+ {
+ *errmsg = "invalid ELF shstrndx == 0";
+ *err = 0;
+ XDELETE (eor);
+ return NULL;
+ }
+
return (void *) eor;
}
|