Thread (72 messages) flat view 72 messages, 20 authors, 2016-06-15
STALE3708d

[PATCH 11/12] verify_path(): do not allow absolute paths

From: Steffen Prohaska <hidden>
Date: 2016-06-15 22:44:52
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

From: Johannes Schindelin <redacted>

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Steffen Prohaska <redacted>
---
 read-cache.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/read-cache.c b/read-cache.c
index f83de8c..cb130ef 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -650,6 +650,11 @@ int verify_path(const char *path)
 {
 	char c;
 
+#ifdef __MINGW32__
+	if (is_absolute_path(path))
+		return error("Cannot handle absolute path: %s", path);
+#endif
+
 	goto inside;
 	for (;;) {
 		if (!c)
-- 
1.5.6.1.255.g32571
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help