diff options
author | Patryk Obara <patryk.obara@gmail.com> | 2018-01-28 01:13:14 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-30 19:42:36 +0100 |
commit | 97a41a0c01cdcbe8153f6b269ff21ee74ecf0092 (patch) | |
tree | c0a843ba9ab825f7b3f583e001e926e4e7d0182c /match-trees.c | |
parent | sha1_file: convert hash_sha1_file to object_id (diff) | |
download | git-97a41a0c01cdcbe8153f6b269ff21ee74ecf0092.tar.xz git-97a41a0c01cdcbe8153f6b269ff21ee74ecf0092.zip |
cache: clear whole hash buffer with oidclr
As long as GIT_SHA1_RAWSZ is equal to GIT_MAX_RAWSZ there's no problem,
but when new hashing algorithm will be in place this memset will clear
only 20-byte prefix of hash buffer.
Alternatively, hashclr implementation could be adjusted, but this
function is almost removed from codebase already. Separate
implementation of oidclr prevents potential buffer overrun in case
someone incorrectly used hashclr on object_id in future.
Signed-off-by: Patryk Obara <patryk.obara@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'match-trees.c')
0 files changed, 0 insertions, 0 deletions