diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-07-16 14:55:48 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-07-16 14:55:48 +0200 |
| commit | 63d2e9d409831aa8582787234cae4741847504b7 (patch) | |
| tree | 595fae753d2eb293437226eaab2eed208463f132 /results/scraper/box64/1493 | |
| parent | 2843bb65aeaeb86eb89bf3d9690db61b9dc6306e (diff) | |
| download | qemu-analysis-box64.tar.gz qemu-analysis-box64.zip | |
add box64 bug reports box64
Diffstat (limited to 'results/scraper/box64/1493')
| -rw-r--r-- | results/scraper/box64/1493 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/results/scraper/box64/1493 b/results/scraper/box64/1493 new file mode 100644 index 000000000..e82524507 --- /dev/null +++ b/results/scraper/box64/1493 @@ -0,0 +1,19 @@ +Maybe a mistake in ELF parser +I know it +```c++ +https://github.com/ptitSeb/box64/blob/main/src/elfs/elfparser.c#L125 +elfheader_t *h = box_calloc(1, sizeof(elfheader_t)); +// ... +h->numSHEntries = header.e_shnum; +// ... +if(header.e_shentsize && header.e_shnum) { + // special cases for nums + if(h->numSHEntries == 0) { // THIS BRANCH IS IMPOSSIBLE TO BE EXECUTED!!! + printf_dump(LOG_DEBUG, "Read number of Sections in 1st Section\n"); + // read 1st section header and grab actual number from here + // ... + h->numSHEntries = section.sh_size; + } +} +``` +`h->numSHEntries` has been stored with value of `e_shnum`, only when `e_shnum` is non-zero will the outter branch be executed, then the `h->numSHEntries` must be non-zero as well, then the inner branch will never be executed. \ No newline at end of file |