https://bugzilla.redhat.com/show_bug.cgi?id=1092759
Bug ID: 1092759
Summary: gzseek calls can incorrectly position the file.
Product: Fedora
Version: 19
Component: mingw-zlib
Assignee: rjones(a)redhat.com
Reporter: tsteven4(a)gmail.com
QA Contact: extras-qa(a)fedoraproject.org
CC: erik-fedora(a)vanpienbroek.nl,
fedora-mingw(a)lists.fedoraproject.org,
lfarkas(a)lfarkas.org, rjones(a)redhat.com,
t.sailer(a)alumni.ethz.ch
Created attachment 890969
-->
https://bugzilla.redhat.com/attachment.cgi?id=890969&action=edit
zlib gzseek test case
Description of problem: gzseek can incorrectly hit EOF, causing subsequent
gzread calls to fail.
Version-Release number of selected component (if applicable):
mingw32-zlib-1.2.7-2.fc19.noarch
How reproducible:
100%
Steps to Reproduce:
1. unzip test case zlib_test2.zip provided.
2. run test2 script to compile the test case.
3. execute test case by running testz2.exe under windows. testz2.exe,
zlib1.dll and test.data all need to be in the directory testz2.exe is executed
from.
Actual results:
Got 0
Expected results:
Got 4
Additional info:
A possible patch with zlib 1.2.8 is listed below, although this might be a
configuration problem. offset, which is of type z_off64_t, ends up being 32
bits as configured.
--- gzlib.c 2013-03-24 23:47:59.000000000 -0600
+++ gzlib.patch.c 2014-04-27 15:34:38.496808069 -0600
@@ -393,7 +393,7 @@
/* if within raw area while reading, just go there */
if (state->mode == GZ_READ && state->how == COPY &&
state->x.pos + offset >= 0) {
- ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR);
+ ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR);
if (ret == -1)
return -1;
state->x.have = 0;
I have reported this to zlib(a)gzip.org but haven't received any response yet.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug
https://bugzilla.redhat.com/token.cgi?t=t37ShhxD8T&a=cc_unsubscribe