aboutsummaryrefslogtreecommitdiff
path: root/contrib/elf2dmp/pdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/elf2dmp/pdb.c')
-rw-r--r--contrib/elf2dmp/pdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c
index b3a6547068..adcfa7e154 100644
--- a/contrib/elf2dmp/pdb.c
+++ b/contrib/elf2dmp/pdb.c
@@ -215,6 +215,10 @@ out_symbols:
static int pdb_reader_ds_init(struct pdb_reader *r, PDB_DS_HEADER *hdr)
{
+ if (hdr->block_size == 0) {
+ return 1;
+ }
+
memset(r->file_used, 0, sizeof(r->file_used));
r->ds.header = hdr;
r->ds.toc = pdb_ds_read(hdr, (uint32_t *)((uint8_t *)hdr +