[BACK]Return to elf.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / nm

Diff for /src/usr.bin/nm/elf.c between version 1.30 and 1.31

version 1.30, 2015/06/23 15:02:58 version 1.31, 2015/06/23 15:13:29
Line 159 
Line 159 
                 return (NULL);                  return (NULL);
         }          }
   
         if ((shdr = calloc(head->e_shentsize, head->e_shnum)) == NULL) {          if (head->e_shentsize < sizeof(Elf_Shdr)) {
                   warnx("%s: inconsistent section header size", name);
                   return (NULL);
           }
   
           if ((shdr = calloc(head->e_shnum, head->e_shentsize)) == NULL) {
                 warn("%s: malloc shdr", name);                  warn("%s: malloc shdr", name);
                 return (NULL);                  return (NULL);
         }          }

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31