Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
clone: use xfopen() instead of fopen()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Wed, 3 May 2017 10:16:47 +0000
(17:16 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 26 May 2017 03:33:55 +0000
(12:33 +0900)
copy_alternates() called fopen() without handling errors. By switching
to xfopen(), this bug is fixed.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
23a9e07
)
diff --git
a/builtin/clone.c
b/builtin/clone.c
index de85b85254e49ba0211ea6476179fc6d4c774ca9..dde4fe73afca7201741ec299af7229edd6031323 100644
(file)
--- a/
builtin/clone.c
+++ b/
builtin/clone.c
@@
-357,7
+357,7
@@
static void copy_alternates(struct strbuf *src, struct strbuf *dst,
* to turn entries with paths relative to the original
* absolute, so that they can be used in the new repository.
*/
- FILE *in = fopen(src->buf, "r");
+ FILE *in =
x
fopen(src->buf, "r");
struct strbuf line = STRBUF_INIT;
while (strbuf_getline(&line, in) != EOF) {