CVS: cvs.openbsd.org: src
Claudio Jeker <[email protected]> Thu, 30 Jul 2026 05:46:49 -0600 (MDT)
| Newsgroups | gmane.os.openbsd.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVSROOT: /cvs Module name: src Changes by: [email protected] 2026/07/30 05:46:49 Modified files: lib/libutil : imsg-buffer.c Log message: Change overflow check in ibuf_get_strbuf ibuf_get_strbuf is too picky about the terminating NUL byte. If the sender did not use ibuf_add_strbuf() then the buffer may not be padded with 0 at the end. This triggers the EOVERFLOW case even though the string is probably short enough. Make ibuf_get_strbuf more robust by checking the string length. If the string is shorter than the buffer pad the rest with 0. On overflow force a '\0' byte at the end and return EOVERFLOW. OK tb@