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

Diff for /src/usr.bin/ctfconv/elf.c between version 1.9 and 1.10

version 1.9, 2017/11/14 09:14:50 version 1.10, 2022/08/14 14:54:13
Line 34 
Line 34 
 {  {
         Elf_Ehdr                *eh = (Elf_Ehdr *)p;          Elf_Ehdr                *eh = (Elf_Ehdr *)p;
   
         if (filesize < (off_t)sizeof(Elf_Ehdr)) {          if (filesize < sizeof(Elf_Ehdr)) {
                 warnx("file too small to be ELF");                  warnx("file too small to be ELF");
                 return 0;                  return 0;
         }          }
Line 55 
Line 55 
                 return 0;                  return 0;
         }          }
         if (eh->e_shoff > filesize) {          if (eh->e_shoff > filesize) {
                 warnx("bogus section table offset 0x%llx", (off_t)eh->e_shoff);                  warnx("bogus section table offset 0x%llx",
                       (unsigned long long)eh->e_shoff);
                 return 0;                  return 0;
         }          }
         if (eh->e_shentsize < sizeof(Elf_Shdr)) {          if (eh->e_shentsize < sizeof(Elf_Shdr)) {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10