summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3.c
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3/xdelta3.c')
-rw-r--r--xdelta3/xdelta3.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c
index b7baa65..431bab9 100644
--- a/xdelta3/xdelta3.c
+++ b/xdelta3/xdelta3.c
@@ -4421,9 +4421,12 @@ xd3_source_match_setup (xd3_stream *stream, xoff_t srcpos)
4421 4421
4422 /* Implement srcwin_maxsz, which prevents the encoder from seeking 4422 /* Implement srcwin_maxsz, which prevents the encoder from seeking
4423 * back further than the LRU cache maintaining FIFO discipline, (to 4423 * back further than the LRU cache maintaining FIFO discipline, (to
4424 * avoid seeking). */ 4424 * avoid seeking). Note the +1 here ensures that "frontier_pos" is
4425 * the address of the next byte in the stream, and ensures that the
4426 * maximum offset is less than the source window size (in
4427 * blocks). */
4425 frontier_pos = 4428 frontier_pos =
4426 stream->src->frontier_blkno * stream->src->blksize; 4429 (stream->src->frontier_blkno +1) * stream->src->blksize;
4427 IF_DEBUG1(DP(RINT "[match_setup] frontier_pos %"Q"u, srcpos %"Q"u, " 4430 IF_DEBUG1(DP(RINT "[match_setup] frontier_pos %"Q"u, srcpos %"Q"u, "
4428 "srcwin_maxsz %u\n", 4431 "srcwin_maxsz %u\n",
4429 frontier_pos, srcpos, stream->srcwin_maxsz)); 4432 frontier_pos, srcpos, stream->srcwin_maxsz));