git/vcs-svn
Jonathan Nieder e7d04ee147 vcs-svn: make reading of properties binary-safe
svn-fe errors out on revision 59151 of the ASF repository:

 fatal: invalid dump: unexpected end of file

The proximate cause is a property with an embedded NUL character.
Previously such anomalies were ignored but commit c9d1c8ba
(2010-12-28) introduced a check strlen(val) == len to avoid reading
uninitialized data when a property list ends early and unfortunately
this test does not distinguish between "foo" followed by EOF and the
string "foo\0bar\0baz".

Fix it by using buffer_read_binary to read to a strbuf and checking
the actual length read.  Most consumers of properties still use
C-style strings, so in practice an author or log message with embedded
NULs will be truncated, but a least this way svn-fe won't error out
(fixing the regression).

Reported-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-03-26 00:15:10 -05:00
..
fast_export.c vcs-svn: use strbuf for author, UUID, and URL 2011-03-22 18:01:48 -05:00
fast_export.h vcs-svn: use strbuf for author, UUID, and URL 2011-03-22 18:01:48 -05:00
LICENSE SVN dump parser 2010-08-14 19:35:38 -07:00
line_buffer.c vcs-svn: make buffer_copy_bytes return length read 2011-03-22 16:40:26 -05:00
line_buffer.h vcs-svn: make buffer_copy_bytes return length read 2011-03-22 16:40:26 -05:00
line_buffer.txt vcs-svn: make buffer_skip_bytes return length read 2011-03-22 16:39:54 -05:00
obj_pool.h Add memory pool library 2010-08-14 19:35:37 -07:00
repo_tree.c vcs-svn: use strbuf for author, UUID, and URL 2011-03-22 18:01:48 -05:00
repo_tree.h vcs-svn: use strbuf for author, UUID, and URL 2011-03-22 18:01:48 -05:00
string_pool.c Add string-specific memory pool 2010-08-14 19:35:37 -07:00
string_pool.h Add string-specific memory pool 2010-08-14 19:35:37 -07:00
string_pool.txt Add string-specific memory pool 2010-08-14 19:35:37 -07:00
svndump.c vcs-svn: make reading of properties binary-safe 2011-03-26 00:15:10 -05:00
svndump.h vcs-svn: Check for errors from open() 2010-11-24 14:51:42 -08:00
trp.h treap: make treap_insert return inserted node 2010-12-07 16:03:55 -08:00
trp.txt treap: make treap_insert return inserted node 2010-12-07 16:03:55 -08:00