summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfab6aa)
raw | patch | inline | side by side (parent: dfab6aa)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 17 Dec 2008 20:37:48 +0000 (12:37 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 17 Dec 2008 21:36:34 +0000 (13:36 -0800) |
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
abspath.c | patch | blob | history |
diff --git a/abspath.c b/abspath.c
index 8194ce1256525105d07eedf2f964ad51d9162d95..649f34f83365db3513c5166b897c4f033831444d 100644 (file)
--- a/abspath.c
+++ b/abspath.c
len = readlink(buf, next_buf, PATH_MAX);
if (len < 0)
die ("Invalid symlink: %s", buf);
+ if (PATH_MAX <= len)
+ die("symbolic link too long: %s", buf);
next_buf[len] = '\0';
buf = next_buf;
buf_index = 1 - buf_index;