Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
parse_color: refactor color storage
[gitweb.git]
/
builtin
/
update-index.c
diff --git
a/builtin/update-index.c
b/builtin/update-index.c
index b0503f4e3d80de42b3b31858303a8e0cbda2b9e4..e8c7fd4d4957b83de42e7af2ef9f2676bfc294b2 100644
(file)
--- a/
builtin/update-index.c
+++ b/
builtin/update-index.c
@@
-640,6
+640,9
@@
static int parse_new_style_cacheinfo(const char *arg,
unsigned long ul;
char *endp;
+ if (!arg)
+ return -1;
+
errno = 0;
ul = strtoul(arg, &endp, 8);
if (errno || endp == arg || *endp != ',' || (unsigned int) ul != ul)