git/vcs-svn
Jonathan Nieder fbdd4f6fb4 vcs-svn: cap number of bytes read from sliding view
Introduce a "max_off" field in struct sliding_view, roughly
representing a maximum number of bytes that can be read from "file".
If it is set to a nonnegative integer, a call to move_window()
attempting to put the right endpoint beyond that offset will return
an error instead.

The idea is to use this when applying Subversion-format deltas to
prevent reads past the end of the preimage (which has known length).
Without such a check, corrupt deltas would cause svn-fe to block
indefinitely when data in the input pipe is exhausted.

Inspired-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-06-15 02:15:22 -05:00
..
fast_export.c vcs-svn: add missing cast to printf argument 2011-03-27 12:21:12 -05:00
fast_export.h vcs-svn: handle log message with embedded NUL 2011-03-26 00:49:37 -05:00
LICENSE vcs-svn: learn to maintain a sliding view of a file 2011-03-27 20:23:32 -05:00
line_buffer.c vcs-svn: make buffer_read_binary API more convenient 2011-03-27 22:37:05 -05:00
line_buffer.h vcs-svn: make buffer_read_binary API more convenient 2011-03-27 22:37:05 -05:00
line_buffer.txt vcs-svn: remove buffer_read_string 2011-03-26 00:17:35 -05:00
obj_pool.h Add memory pool library 2010-08-14 19:35:37 -07:00
repo_tree.c vcs-svn: handle log message with embedded NUL 2011-03-26 00:49:37 -05:00
repo_tree.h vcs-svn: handle log message with embedded NUL 2011-03-26 00:49:37 -05:00
sliding_window.c vcs-svn: cap number of bytes read from sliding view 2011-06-15 02:15:22 -05:00
sliding_window.h vcs-svn: cap number of bytes read from sliding view 2011-06-15 02:15:22 -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
svndiff.c vcs-svn: let deltas use data from preimage 2011-03-28 00:33:48 -05:00
svndiff.h vcs-svn: skeleton of an svn delta parser 2011-03-27 22:41:38 -05:00
svndump.c vcs-svn: handle log message with embedded NUL 2011-03-26 00:49:37 -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