{ "tokens": { "input": 5617, "cache_read": 3441, "cache_write": 6882, "output": 1441 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/a/anjuta/anjuta_3.34.0.orig.tar.xz", "your anjuta-3.34.0/plugins/symbol-db/symbol-db-query.c:449:26: warning: Buffer is accessed out of bounds: \"\" [bufferAccessOutOfBounds]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "`g_string_new_len(\"\", 1024)` copies 1024 bytes from its `init` argument. The GLib docs say the caller must make sure `init` has at least `len` addressable bytes. The string literal `\"\"` is only 1 byte, so this reads 1023 bytes past the end of the literal. That is a real out-of-bounds read; the author probably meant `g_string_sized_new(1024)`. The PR now computes buffer sizes for string literals, which lets Cppcheck catch this. It is a new true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/perdition/perdition_2.2.orig.tar.xz", "your perdition-2.2/perdition/db/daemon/client.c:108:19: warning: Buffer is accessed out of bounds: \"/tmp/perdition-map-XXXXXX\" [bufferAccessOutOfBounds]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The new warning is a true positive. `DIR_TEMPLATE` is the string literal \"/tmp/perdition-map-XXXXXX\", which is 26 bytes including the NUL. The `memcpy` copies `PERDITION_UN_STR_LEN-1` bytes from it. That constant sizes Unix socket path buffers (around 108, like `sun_path`), so it is far larger than 26. The call therefore reads past the end of the literal. The PR's new string-literal buffer size lets Cppcheck catch this real bug." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/perdition/perdition_2.2.orig.tar.xz", "your perdition-2.2/perdition/db/daemon/perditiondb_daemon.c:240:19: warning: Buffer is accessed out of bounds: \"/tmp/perdition-map-XXXXXX\" [bufferAccessOutOfBounds]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "DIR_TEMPLATE is the string literal \"/tmp/perdition-map-XXXXXX\", which is 26 bytes including the terminator. The code calls memcpy with length PERDITION_UN_STR_LEN-1. Cppcheck only reports this if it resolved that length to a known value larger than 26 (the macro is likely a sun_path-sized constant around 108). Copying that many bytes reads past the end of the literal, which is undefined behaviour. strncpy or a sized copy would have been correct. The PR now computes buffer sizes for string literals, so this new warning is a true positive." } } ], "started": "2026-10-15 19:55:16 UTC", "runner": "pc" }