Merge branch 'tg/memfixes'

Fixes for a handful memory access issues identified by valgrind.

* tg/memfixes:
  sub-process: use child_process.args instead of child_process.argv
  http-push: fix construction of hex value from path
  path.c: fix uninitialized memory access
This commit is contained in:
Junio C Hamano
2017-10-07 16:27:54 +09:00
3 changed files with 6 additions and 8 deletions

View File

@ -1018,7 +1018,7 @@ static int get_oid_hex_from_objpath(const char *path, struct object_id *oid)
memcpy(hex, path, 2);
path += 2;
path++; /* skip '/' */
memcpy(hex, path, GIT_SHA1_HEXSZ - 2);
memcpy(hex + 2, path, GIT_SHA1_HEXSZ - 2);
return get_oid_hex(hex, oid);
}