Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logging: do not read more that the buf size
msg_len doesn't take into account NUL bytes that could be present in the buffer, while g_strdup_printf("MESSAGE=%s%s", partial_buf, buf) does and would stop writing the string once it finds a NUL byte. This would lead to read after the buffer end. Build the message string manually so that the calculated length reflects the buffer size. Closes: containers#315 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
- Loading branch information