Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
upload-pack: tighten number parsing at "deepen" lines
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 12 Jun 2016 10:53:50 +0000
(17:53 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 13 Jun 2016 21:38:16 +0000
(14:38 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
8bf3b75
)
diff --git
a/upload-pack.c
b/upload-pack.c
index fa7ce092e77035974596b0879002bb093b300679..8f4d7f46ccce90f125e024cda04abab221fd0dee 100644
(file)
--- a/
upload-pack.c
+++ b/
upload-pack.c
@@
-645,9
+645,9
@@
static void receive_needs(void)
continue;
}
if (skip_prefix(line, "deepen ", &arg)) {
- char *end;
+ char *end
= NULL
;
depth = strtol(arg, &end, 0);
- if (
end == arg
|| depth <= 0)
+ if (
!end || *end
|| depth <= 0)
die("Invalid deepen: %s", line);
continue;
}