Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Off-by-one error in get_path_prefix(), found by Valgrind

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:28

Pavel Roskin [off-list ref] writes:
On Wed, 2006-06-07 at 20:05 +0200, Rene Scharfe wrote:
quoted
Argh, yes.  Thanks, Pavel!
Actually, thanks to Julian Seward for Valgrind.
quoted
  However, the other branch is incorrect, too:
accessing path->buf[path->len] is wrong, even if it's within the buffer.
In order to use a length variable to point to the end of some string we
need to subtract 1. *sigh*  So, how about this one instead?
Fine with me.  Thank you for noticing!
Thanks both.  Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help