diff options
author | Heiko Voigt <hvoigt@hvoigt.net> | 2012-07-28 17:46:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-29 18:02:51 -0700 |
commit | cb2912c324477f0d92618ac258c43b2692e870c4 (patch) | |
tree | 629364257c36268a88e22a636d6a12258c821b60 /http.h | |
parent | Git 1.7.9.7 (diff) | |
download | tgif-cb2912c324477f0d92618ac258c43b2692e870c4.tar.xz |
link_alt_odb_entry: fix read over array bounds reported by valgrind
pfxlen can be longer than the path in objdir when relative_base
contains the path to gits object directory. Here we are interested
in checking if ent->base[] (the part that corresponds to .git/objects)
is the same string as objdir, and the code NUL-terminated ent->base[]
to
LEADING PATH\0XX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\0
in preparation for these "duplicate check" step (before we return
from the function, the first NUL is turned into '/' so that we can
fill XX when probing for loose objects). All we need to do is to
compare the string with the path to our object directory.
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
0 files changed, 0 insertions, 0 deletions