Merge branch 'nd/misc-cleanups'
* nd/misc-cleanups: unpack_object_header_buffer(): clear the size field upon error tree_entry_interesting: make use of local pointer "item" tree_entry_interesting(): give meaningful names to return values read_directory_recursive: reduce one indentation level get_tree_entry(): do not call find_tree_entry() on an empty tree tree-walk.c: do not leak internal structure in tree_entry_len()
This commit is contained in:
@ -1267,7 +1267,8 @@ unsigned long unpack_object_header_buffer(const unsigned char *buf,
|
||||
while (c & 0x80) {
|
||||
if (len <= used || bitsizeof(long) <= shift) {
|
||||
error("bad object header");
|
||||
return 0;
|
||||
size = used = 0;
|
||||
break;
|
||||
}
|
||||
c = buf[used++];
|
||||
size += (c & 0x7f) << shift;
|
||||
|
Reference in New Issue
Block a user