Forcibly set the current seek location of gz files that we are accessing
via dup(fileno());gzdopen() because stdio might have buffered data from the underlying file meaning that the underlying seek position isn't what we think it is.
This commit is contained in:
@@ -4272,6 +4272,7 @@ int fstReaderInit(struct fstReaderContext *xc)
|
||||
#endif
|
||||
|
||||
zfd = dup(fileno(xc->f));
|
||||
lseek(zfd, ftell(xc->f), SEEK_SET);
|
||||
zhandle = gzdopen(zfd, "rb");
|
||||
if (zhandle) {
|
||||
for (offpnt = 0; offpnt < uclen; offpnt += FST_GZIO_LEN) {
|
||||
|
||||
Reference in New Issue
Block a user