← Commit list

5687d211c4

Viktor Szakats
Viktor Szakats
2026-06-15
SUCCESS Duration: 185s

Subject

servers: fix off-by-3 OOB write for large `loghex()` inputs

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/server/util.c+1 -1
@@ -42,7 +42,7 @@ void loghex(const unsigned char *buffer, ssize_t len)
ssize_t width = 0;
int left = sizeof(data);
- for(i = 0; i < len && (left >= 0); i++) {
+ for(i = 0; i < len && (left > 2); i++) {
snprintf(optr, left, "%02x", ptr[i]);
width += 2;
optr += 2;