[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] output.c: Fix memory stomp when need==fmtbuf.size
From: |
Ray Donnelly |
Subject: |
[PATCH] output.c: Fix memory stomp when need==fmtbuf.size |
Date: |
Sun, 26 Jan 2014 15:28:15 +0000 |
Hi,
Git commit 757849cd introduced a memory stomp in get_buffer() in
output.c. If "need" is is equal to "fmtbuf.size" then:
fmtbuf.buffer[need] = '\0';
.. writes '\0' to a byte 1 beyond the size of the allocated buffer.
Please find attached a patch which fixes this.
Best regards,
Ray Donnelly.
0001-output.c-Fix-memory-stomp-when-need-fmtbuf.size.patch
Description: Binary data
- [PATCH] output.c: Fix memory stomp when need==fmtbuf.size,
Ray Donnelly <=