projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[PATCH] fix segfault in fsck-cache
[git.git]
/
sha1_file.c
diff --git
a/sha1_file.c
b/sha1_file.c
index
97a515a
..
28ad159
100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-155,6
+155,8
@@
void * unpack_sha1_file(void *map, unsigned long mapsize, char *type, unsigned l
inflateInit(&stream);
ret = inflate(&stream, 0);
+ if (ret < Z_OK)
+ return NULL;
if (sscanf(buffer, "%10s %lu", type, size) != 2)
return NULL;