From: David Barr Date: Thu, 24 Mar 2011 12:43:56 GMT Subject: [PATCH] fixup! vcs-svn: improve reporting of input errors Message-ID: <1300970636-31743-1-git-send-email-david.barr@cordelta.com> In-Reply-To: <7vsjuegzj8.fsf@alter.siamese.dyndns.org> 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