diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-30 12:24:58 +0000 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-30 12:27:06 +0000 |
| commit | 33606b41d35115f887ea688b1a16f2ff85bf2fe4 (patch) | |
| tree | 406b2c7b19a087ba437c68f3dbf0b589fa1d6150 /results/scraper/launchpad-without-comments/1879998 | |
| parent | adedf8771bc4de3113041ca21bd4d0d1c0014b6a (diff) | |
| download | qemu-analysis-33606b41d35115f887ea688b1a16f2ff85bf2fe4.tar.gz qemu-analysis-33606b41d35115f887ea688b1a16f2ff85bf2fe4.zip | |
add launchpad bug reports without comments
Diffstat (limited to 'results/scraper/launchpad-without-comments/1879998')
| -rw-r--r-- | results/scraper/launchpad-without-comments/1879998 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/results/scraper/launchpad-without-comments/1879998 b/results/scraper/launchpad-without-comments/1879998 new file mode 100644 index 000000000..a14b0d217 --- /dev/null +++ b/results/scraper/launchpad-without-comments/1879998 @@ -0,0 +1,27 @@ +Bad check for return value of mmap() + +In +./roms/skiboot/extract-gcov.c +there is this code: + + addr = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); + assert(addr != NULL); + +This check is wrong, mmap never returns NULL, on errors it returns MAP_FAILED (or -1). (Also sidenote: asserts usually shouldn't be used for error checking.) + +In +roms/skiboot/libstb/print-container.c +there's a similar issue: + + payload = mmap(NULL, payload_st.st_size - SECURE_BOOT_HEADERS_SIZE, + PROT_READ, MAP_PRIVATE, fdin, SECURE_BOOT_HEADERS_SIZE); + if (!payload) + +This if should be (payload == MAP_FAILED). + +Another one is in +./roms/skiboot/libstb/create-container.c + +And in +./roms/u-boot/tools/aisimage.c +there's an mmap call that does not check the return value at all. \ No newline at end of file |