Thread (67 messages) flat view 67 messages, 5 authors, 2016-06-15
STALE3730d

[PATCH] fixup! vcs-svn: improve reporting of input errors

From: David Barr <hidden>
Date: 2016-06-15 22:50:52
Subsystem: the rest · Maintainer: Linus Torvalds

An excessive constraint was introduced in c9d1c8ba; when reading
svn props, it is permissible for both keys and values to contain
nul characters. Thus the test `strlen(val) != len` may fail on
such properties. This caused svn-fe to die early whilst handling
revision 59151 of the ASF repository.
---
 vcs-svn/svndump.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index ea5b128..9bd4fb2 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -171,7 +171,7 @@ static void read_props(void)
 			die("invalid property line: %s\n", t);
 		len = atoi(&t[2]);
 		val = buffer_read_string(&input, len);
-		if (!val || strlen(val) != len)
+		if (!val)
 			die_short_read();
 
 		/* Discard trailing newline. */
-- 
1.7.3.2.846.gf4b062
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help