summaryrefslogtreecommitdiff
path: root/usr.bin/ctfdump
AgeCommit message (Collapse)Author
2024-02-22Print the size of more objects (basic types and enums) based on theirClaudio Jeker
ctt_size info. This helps to ensure that the reported sizes match. OK mpi@
2022-08-14Use size_t for the length parameters, not off_t.Todd C. Miller
Now that zlib uses unsigned long for its totals there is no reason to use off_t in ctfdump. This is similar to the changes in db_ctf.c. OK tb@
2022-08-10Fix two compiler warnings resulting from last zlib bumpTheo Buehler
total_out is now an unsigned long, so a format string warning is issued on all architectures. Fix this and also fix the format string for the off_t len, which is signed, not unsigned. Comparing an unsigned long to an off_t involves implementation-defined behavior for values > LONG_MAX on 64-bit architectures, so the compiler complains. Fix this by checking that len >= 0 and then casting both sides to a wider type. reported by and ok deraadt
2022-02-10Casting a char pointer to struct ctf_header causes bus error onAlexander Bluhm
sparc64. Use memcpy() to align the data. found by regress/usr.bin/ctfdump; OK mpi@
2019-09-03Use 0 as exit value if no error has been found in the CTF section.Martin Pieuchot
ok sunil@
2019-05-14Remove leftover elf.cSunil Nimmagadda
2019-05-14Use elf(3) api instead of an ad-hoc elf parser.Sunil Nimmagadda
Ok mpi@
2019-03-16Fix a buffer over-read while dumping functions.Sunil Nimmagadda
A bogus vlen in metadata could cause offset point beyond CTF section boundary. Found by afl-fuzz. Ok mpi@
2019-03-16Fix a buffer over-read while dumping structs/unions.Sunil Nimmagadda
A bogus vlen in metadata could cause offset point beyond CTF section boundary. Found by afl-fuzz. Ok mpi@
2019-03-16Fix a buffer over-read while dumping enums.Sunil Nimmagadda
A bogus vlen in metadata could cause offset point beyond CTF section boundary. Found by afl-fuzz. Feedback and Ok mpi@
2017-11-14Verify that every section header lies within the mapped file.Martin Pieuchot
Pointed out by Mark Johnston, Markj@FreeBSD
2017-11-06Use the symtab's sh_link to get the string table section.Martin Pieuchot
This is technically more correct than looking for ".strtab" and allows us to get rid of unportable ELF_STRTAB. We can also get rid of the hack for some incorrect ELF files since we no longer try to apply relocations for the string table. From Mark Johnston, markj@FreeBSD
2017-11-03Fix formatting in the case where a symbol table isn't present.Martin Pieuchot
From Mark Johnston, markj@FreeBSD
2017-11-01Disable relocation until it is shown to be necessary. This codeMartin Pieuchot
is present here because ctfconv(1) needs it. Prevent an access violation since the file is mmap(2)'d without write permission. Triggered by jsg@ with afl(1).
2017-10-28Correctly handle binaries without string table.Martin Pieuchot
Found by jsg@ with afl(1).
2017-10-28Correct an integer overflow check to detect invalid CTF section.Martin Pieuchot
Found by jsg@ with afl(1).
2017-10-28Print values as unsigned when dumping header.Martin Pieuchot
2017-10-27Prevent out-of-bound with malformed type entry.Martin Pieuchot
Issue found by jsg@ with afl(1).
2017-10-27Prevent out-of-bound leading to an invalid pointer dereference whenMartin Pieuchot
dumping functions. Sync the logic with the kernel iterator for that. Issue found by jsg@ with afl(1).
2017-10-27Use <elf.h> rather than <sys/exec_elf.h>.Martin Pieuchot
The former is more portable.
2017-10-17add missing HISTORY; based on CVS logs and release announcementsIngo Schwarze
2017-10-16Typo in header dump, from sbz@FreeBSDMartin Pieuchot
2017-10-05add boundary tests to avoid some crashes found with aflJonathan Gray
ok mpi@
2017-10-05sync elf.c with ctfconvJonathan Gray
ok mpi@ jasper@
2017-09-23Fix off by one in ctf_enc2name (who uses SIGNED BOOL anyway?)Uwe Stuehler
ok mpi
2017-09-23Show floating-point encoding by name in ctfdump(1)Uwe Stuehler
ok mpi
2017-09-19fix fd leaks in error pathsJonathan Gray
ok mpi@
2017-08-29quarterly rescan of the tree: remove unneccessary sys/param.h, andTheo de Raadt
annotate the ones which are needed.
2017-08-11move pledge after setlocale as suggested by tb@Jasper Lievisse Adriaanse
2017-08-11pledge ctfdump to stdio and rpathJasper Lievisse Adriaanse
ok mpi@
2017-08-11tweak previous;Jason McIntyre
2017-08-11add rcs idsJasper Lievisse Adriaanse
2017-08-11Import a tool for dumping the contents of CTF data section (SUNW_ctf).Martin Pieuchot
ok deraadt@, kettenis@, jasper@