Browse code

libclamav/elf.c: shutdown error message (bb#2318)

Tomasz Kojm authored on 2010/10/08 22:23:40
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Fri Oct  8 15:22:22 CEST 2010 (tk)
2
+----------------------------------
3
+ * libclamav/elf.c: shutdown error message (bb#2318)
4
+
1 5
 Fri Oct  8 14:23:24 CEST 2010 (tk)
2 6
 ----------------------------------
3 7
  * libclamav/readdb.c: fix handling of Engine attrib (bb#2297)
... ...
@@ -596,6 +596,9 @@ int cli_elfheader(fmap_t *map, struct cli_exe_info *elfinfo)
596 596
 	return -1;
597 597
     }
598 598
 
599
+    if(!shnum)
600
+	return 0;
601
+
599 602
     shoff = EC32(file_hdr.e_shoff, conv);
600 603
 
601 604
     elfinfo->section = (struct cli_exe_section *) cli_calloc(elfinfo->nsections, sizeof(struct cli_exe_section));