author | Jonathan Nieder <jrnieder@gmail.com> | |
Thu, 2 Feb 2012 11:03:16 +0000 (05:03 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 2 Feb 2012 19:03:30 +0000 (11:03 -0800) | ||
commit | 150f75467cdd6eaf581d22175bb377399c62893a | |
tree | c169a5c91beda46183b1f51c13c9038b2dc8de2b | tree | snapshot |
parent | 173223aa62519033e547937c692f5540f59d9025 | commit | diff |
vcs-svn: allow import of > 4GiB files
There is no reason in principle that an svn-format dump would not be
able to represent a file whose length does not fit in a 32-bit
integer. Use off_t consistently to represent file lengths (in place
of using uint32_t in some contexts) so we can handle that.
Most svn-fe code is already ready to do that without this patch and
passes values of type off_t around. The type mismatch from stragglers
was noticed with gcc -Wtype-limits.
While at it, tighten the parsing of the Text-content-length field to
make sure it is a number and does not overflow, and tighten other
overflow checks as that value is passed around and manipulated.
Inspired-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
There is no reason in principle that an svn-format dump would not be
able to represent a file whose length does not fit in a 32-bit
integer. Use off_t consistently to represent file lengths (in place
of using uint32_t in some contexts) so we can handle that.
Most svn-fe code is already ready to do that without this patch and
passes values of type off_t around. The type mismatch from stragglers
was noticed with gcc -Wtype-limits.
While at it, tighten the parsing of the Text-content-length field to
make sure it is a number and does not overflow, and tighten other
overflow checks as that value is passed around and manipulated.
Inspired-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vcs-svn/fast_export.c | diff | blob | history | |
vcs-svn/fast_export.h | diff | blob | history | |
vcs-svn/svndump.c | diff | blob | history |