Otherwise a segfault occurs due to an out-of-bound access
Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Yonghong Zhu <[email protected]>
Cc: Liming Gao <[email protected]>
Signed-off-by: Ronny Chevalier <[email protected]>
---
BaseTools/Source/C/GenFw/Elf32Convert.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 9bf5855..cdb3246 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -670,6 +670,7 @@ WriteSections32 (
|| Sym->st_shndx == SHN_ABS
|| Sym->st_shndx > mEhdr->e_shnum) {
Error (NULL, 0, 3000, "Invalid", "%s bad symbol definition.",
mInImageName);
+ continue;
}
SymShdr = GetShdrByIndex(Sym->st_shndx);
--
2.7.1
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel