On Mon, Sep 18, 2017 at 07:42:53PM -0700, Jonathan Nieder wrote:
> Jeff King wrote:
>
> > Reported-by: Michael Haggerty
> > Signed-off-by: Jeff King
> > ---
> > sha1_file.c | 29 +
> > 1 file changed, 9 insertions(+), 20
Jeff King wrote:
> Reported-by: Michael Haggerty
> Signed-off-by: Jeff King
> ---
> sha1_file.c | 29 +
> 1 file changed, 9 insertions(+), 20 deletions(-)
Thanks for tracking it down.
Reviewed-by: Jonathan Nieder
Jeff King writes:
> We could also just make a NUL-terminated copy of the input
> bytes and operate on that. But since all but one caller
> already is passing a string, instead let's just fix that
> caller to provide NUL-terminated input in the first place,
> by swapping out mmap
The link_alt_odb_entries() function has always taken a
ptr/len pair as input. Until cf3c635210 (alternates: accept
double-quoted paths, 2016-12-12), we made a copy of those
bytes in a string. But after that commit, we switched to
parsing the input left-to-right, and we ignore "len"
totally,
4 matches
Mail list logo