Stephen Frost writes:
> Strictly speaking, it's this:
> tborder[i] = '\0';
> Which ends up writing past the end of the buffer (which is allocated as
> 'width + 1'). Perhaps we should also change that to be:
> tborder[width] = '\0';
Yeah, I like that better too. Will commit.
* Xi Wang (xi.w...@gmail.com) wrote:
> Don't write past the end of tborder; the size is width + 1.
This whole block of code is woefully without any comments. :(
Strictly speaking, it's this:
tborder[i] = '\0';
Which ends up writing past the end of the buffer (which is allocated as
'width + 1').
Don't write past the end of tborder; the size is width + 1.
---
src/interfaces/libpq/fe-print.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c
index 076e1cc..7ed489a 100644
--- a/src/interfaces/libpq/fe-print