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.
This commit is contained in:
Nick Mathewson 2011-06-02 17:07:40 -04:00
parent 7b9d13957f
commit 8254de765d

View File

@ -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;