From 8254de765d80a750898de67e61dcc627dceaf80f Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 2 Jun 2011 17:07:40 -0400 Subject: [PATCH] Fix windows file segment mappings Instead of mapping enough bytes for each segment, we were failing to take into account the slop created by rounding the segment position down to the nearest page. Should fix bug 3142394 found by Sebastian Hahn. --- buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buffer.c b/buffer.c index d6ecb81a..0a0be15b 100644 --- a/buffer.c +++ b/buffer.c @@ -2840,7 +2840,7 @@ evbuffer_add_file_segment(struct evbuffer *buf, FILE_MAP_READ, offset_rounded >> 32, offset_rounded & 0xfffffffful, - length); + length + offset_remaining); if (data == NULL) { mm_free(chain); goto err;