summaryrefslogtreecommitdiffstats
path: root/usr.bin/file/apprentice.c
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2009-11-11 16:21:51 +0000
committerjsg <jsg@openbsd.org>2009-11-11 16:21:51 +0000
commit8049f221b812e48ce6e6eb44132232cc59442e7e (patch)
tree37122d14c5ef7804fbea7c302e0f398214799500 /usr.bin/file/apprentice.c
parentincorrect range check, > vs >=, on the error list, spotted by parfait (diff)
downloadwireguard-openbsd-8049f221b812e48ce6e6eb44132232cc59442e7e.tar.xz
wireguard-openbsd-8049f221b812e48ce6e6eb44132232cc59442e7e.zip
fix a buffer overflow found by parfait
ok millert@
Diffstat (limited to 'usr.bin/file/apprentice.c')
-rw-r--r--usr.bin/file/apprentice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/file/apprentice.c b/usr.bin/file/apprentice.c
index 1e825b6c2a5..42d8ca2514d 100644
--- a/usr.bin/file/apprentice.c
+++ b/usr.bin/file/apprentice.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apprentice.c,v 1.28 2009/10/27 23:59:37 deraadt Exp $ */
+/* $OpenBSD: apprentice.c,v 1.29 2009/11/11 16:21:51 jsg Exp $ */
/*
* Copyright (c) Ian F. Darwin 1986-1995.
* Software written by Ian F. Darwin and others;
@@ -2084,7 +2084,7 @@ swap4(uint32_t sv)
private uint64_t
swap8(uint64_t sv)
{
- uint32_t rv;
+ uint64_t rv;
uint8_t *s = (uint8_t *)(void *)&sv;
uint8_t *d = (uint8_t *)(void *)&rv;
#if 0