summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_gzip.c
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1997-12-14 19:36:24 +0000
committerjdp <jdp@FreeBSD.org>1997-12-14 19:36:24 +0000
commit8e5b281441ab7614a0f1128bc5228ca02d60525b (patch)
tree7fb3c5fce2454584517b0637e6259c687040d1ee /sys/kern/imgact_gzip.c
parentdea81c7ca70460774184fa5991ca69eb2d489123 (diff)
downloadFreeBSD-src-8e5b281441ab7614a0f1128bc5228ca02d60525b.zip
FreeBSD-src-8e5b281441ab7614a0f1128bc5228ca02d60525b.tar.gz
Make gzipped dynamically linked executables work again. There was
an old bug here that failed to copy the a.out header into memory properly. It didn't matter until changes were made recently to the dynamic linker.
Diffstat (limited to 'sys/kern/imgact_gzip.c')
-rw-r--r--sys/kern/imgact_gzip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c
index b588962..aabbdc9 100644
--- a/sys/kern/imgact_gzip.c
+++ b/sys/kern/imgact_gzip.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: imgact_gzip.c,v 1.30 1997/08/26 00:02:24 bde Exp $
+ * $Id: imgact_gzip.c,v 1.31 1997/09/02 20:05:34 bde Exp $
*
* This module handles execution of a.out files which have been run through
* "gzip". This saves diskspace, but wastes cpu-cycles and VM.
@@ -339,9 +339,9 @@ Flush(void *vp, u_char * ptr, u_long siz)
gz->error = i;
return ENOEXEC;
}
- if (gz->file_offset < sizeof gz->a_out) {
- q = (u_char *) gz->virtual_offset + gz->output - gz->file_offset;
- bcopy(&gz->a_out, q, sizeof gz->a_out - gz->file_offset);
+ if (gz->file_offset == 0) {
+ q = (u_char *) gz->virtual_offset;
+ bcopy(&gz->a_out, q, sizeof gz->a_out);
}
}
}
OpenPOWER on IntegriCloud