diff options
-rw-r--r-- | exec/exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/exec/exec.c b/exec/exec.c index 42fbea3d..a547b80f 100644 --- a/exec/exec.c +++ b/exec/exec.c @@ -930,6 +930,7 @@ check_gzip (struct execdata *earg) return; } + rewind (&e->stream); if (get_method (0) != 0) { /* Not a happy gzip file. */ @@ -970,7 +971,8 @@ check_gzip (struct execdata *earg) e->stream.__bufp = e->stream.__buffer; e->stream.__seen = 1; - e->error = 0; + e->bfd = bfd_openstreamr (NULL, NULL, &e->stream); + e->error = e->bfd ? 0 : b2he (ENOEXEC); } |