aboutsummaryrefslogtreecommitdiff
path: root/gzread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzread.c')
-rw-r--r--gzread.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gzread.c b/gzread.c
index 8fc2915..213ad8c 100644
--- a/gzread.c
+++ b/gzread.c
@@ -207,6 +207,15 @@ local int gz_head(state)
207 } 207 }
208 } 208 }
209 209
210 /* no gzip header -- if we were decoding gzip before, then this is trailing
211 garbage. Ignore the trailing garbage and finish. */
212 if (state->direct == 0) {
213 strm->avail_in = 0;
214 state->eof = 1;
215 state->have = 0;
216 return 0;
217 }
218
210 /* doing raw i/o, save start of raw data for seeking, copy any leftover 219 /* doing raw i/o, save start of raw data for seeking, copy any leftover
211 input to output -- this assumes that the output buffer is larger than 220 input to output -- this assumes that the output buffer is larger than
212 the input buffer, which also assures space for gzungetc() */ 221 the input buffer, which also assures space for gzungetc() */