{ "tokens": { "input": 7423, "cache_read": 8337, "cache_write": 5558, "output": 780 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/g/guitarix/guitarix_0.47.0+dfsg.orig.tar.xz", "main guitarix-0.47.0+dfsg/specmatch/pyjackx.c:1471:7: error: Memory is allocated but not initialized: q [uninitdata]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Line 1471 is `*q++ = ...;`. This writes to the freshly malloc'd memory through `q` and advances the pointer. It never reads uninitialized data: the increment only changes the pointer value, which is initialized, and the dereference is an assignment target. The old uninitdata warning was a false positive. The PR stops treating inc/dec of a non-dereferenced pointer to allocated memory as a read, so removing this warning is correct." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/h/heimdal/heimdal_7.8.git20240113.1b4565a+dfsg.orig.tar.xz", "main heimdal-7.8.git20240113.1b4565a/lib/hcrypto/rsa-ltm.c:307:6: error: Memory is allocated but not initialized: ptr [uninitdata]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Line 307 is `*ptr++ = 0;`, which writes to the freshly malloc'd buffer and only increments the pointer itself. No uninitialized memory is read, so the uninitdata warning in main was a false positive. The PR stops treating increments and assignments of a non-dereferenced pointer as reads of the allocated data, and the warning goes away." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/h/heimdal/heimdal_7.8.git20240113.1b4565a+dfsg.orig.tar.xz", "main heimdal-7.8.git20240113.1b4565a/lib/libedit/examples/wtc1.c:76:3: error: Memory is allocated but not initialized: bptr [uninitdata]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "`bptr += wctomb(bptr, ptr[i]);` changes the pointer value (pointer arithmetic). It does not read the uninitialized malloc'd memory, and wctomb writes to that buffer. The old uninitdata warning was a false positive, and the PR correctly removes it." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/o/ocfs2-tools/ocfs2-tools_1.8.9.orig.tar.gz", "main ocfs2-tools-ocfs2-tools-1.8.9/mount.ocfs2/mntent.c:40:4: error: Memory is allocated but not initialized: sp [uninitdata]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "`*sp++ = *s;` writes to the malloc'd buffer. It advances the pointer `sp` but never reads the uninitialized memory it points to. Reporting \"Memory is allocated but not initialized: sp\" here is a false positive. The PR makes Cppcheck treat assignment and increment on a pointer to uninitialized allocated memory as safe when there is no read through it, so removing this warning is correct." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/o/ocfs2-tools/ocfs2-tools_1.8.9.orig.tar.gz", "main ocfs2-tools-ocfs2-tools-1.8.9/mount.ocfs2/mntent.c:79:5: error: Memory is allocated but not initialized: sp [uninitdata]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "`sp` is a pointer to freshly malloc'ed memory. `*sp++ = ...` writes into that memory and moves the pointer forward; it never reads the uninitialized contents. Main reported it anyway, apparently because the `++` on `sp` was treated as a read of uninitialized data. That was a false positive. The PR handles inc/dec and assignment on a pointer that is not dereferenced (`sp` itself, not `*sp`) as safe, which removes it." } } ], "started": "2026-10-10 14:43:46 UTC", "runner": "laptop1" }