git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
7aeb81f
)
real_path: set errno when max number of symlinks is exceeded
author
Brandon Williams
<redacted>
Mon, 9 Jan 2017 18:50:24 +0000
(10:50 -0800)
committer
Junio C Hamano
<redacted>
Mon, 9 Jan 2017 19:26:10 +0000
(11:26 -0800)
Set errno to ELOOP when the maximum number of symlinks is exceeded, as
would be done by other symlink-resolving functions.
Signed-off-by: Brandon Williams <redacted>
Signed-off-by: Junio C Hamano <redacted>
abspath.c
patch
|
blob
|
history
diff --git
a/abspath.c
b/abspath.c
index 0393213e5af3a416c7b35397168b1b04611c2480..fce40fddcc3b68a644fb93a698da8164a1d9b9cf 100644
(file)
--- a/
abspath.c
+++ b/
abspath.c
@@
-141,6
+141,8
@@
char *strbuf_realpath(struct strbuf *resolved, const char *path,
strbuf_reset(&symlink);
if (num_symlinks++ > MAXSYMLINKS) {
+ errno = ELOOP;
+
if (die_on_error)
die("More than %d nested symlinks "
"on path '%s'", MAXSYMLINKS, path);
git clone https://git.99rst.org/PROJECT