{ "tokens": { "input": 3767, "cache_read": 3441, "cache_write": 3441, "output": 896 }, "reviews": [ { "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" }