=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ctfconv/elf.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/ctfconv/elf.c 2017/11/14 09:14:50 1.9 --- src/usr.bin/ctfconv/elf.c 2022/08/14 14:54:13 1.10 *************** *** 1,4 **** ! /* $OpenBSD: elf.c,v 1.9 2017/11/14 09:14:50 mpi Exp $ */ /* * Copyright (c) 2016 Martin Pieuchot --- 1,4 ---- ! /* $OpenBSD: elf.c,v 1.10 2022/08/14 14:54:13 millert Exp $ */ /* * Copyright (c) 2016 Martin Pieuchot *************** *** 34,40 **** { Elf_Ehdr *eh = (Elf_Ehdr *)p; ! if (filesize < (off_t)sizeof(Elf_Ehdr)) { warnx("file too small to be ELF"); return 0; } --- 34,40 ---- { Elf_Ehdr *eh = (Elf_Ehdr *)p; ! if (filesize < sizeof(Elf_Ehdr)) { warnx("file too small to be ELF"); return 0; } *************** *** 55,61 **** return 0; } if (eh->e_shoff > filesize) { ! warnx("bogus section table offset 0x%llx", (off_t)eh->e_shoff); return 0; } if (eh->e_shentsize < sizeof(Elf_Shdr)) { --- 55,62 ---- return 0; } if (eh->e_shoff > filesize) { ! warnx("bogus section table offset 0x%llx", ! (unsigned long long)eh->e_shoff); return 0; } if (eh->e_shentsize < sizeof(Elf_Shdr)) {