summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2004-02-25 23:36:12 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2004-02-25 23:36:12 +0000
commit90ac2498e6afb3b107f91cc16a39e8fb0f1d860d (patch)
tree43436443f64132372f3afa74fec60f1c34de121b /libexec
parent4af1380b93ef77e3e9397d3ed1ae0c2ee04b083a (diff)
Fix this assumed sizeof(long) == 4 error. Would very occasionally cause
the code to attempt to zero 4 bytes of the next page.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/util.c b/libexec/ld.so/util.c
index 5ceaaf5f435..4cbad23e467 100644
--- a/libexec/ld.so/util.c
+++ b/libexec/ld.so/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.16 2003/07/06 20:03:58 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.17 2004/02/25 23:36:11 drahn Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -90,7 +90,7 @@ _dl_malloc(size_t size)
}
if (t) {
*n = *t;
- _dl_memset(t, 0, t[-1] - 4);
+ _dl_memset(t, 0, t[-1] - sizeof(long));
return((void *)t);
}
}