summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-07-11 07:08:47 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-07-11 07:08:47 +0000
commit55c50a3bc70610d195df2201fbd4310c3048066d (patch)
tree9fbf22ddd2218ce75f1e4c6e8d5f6486fa32de01 /usr.bin
parent6d8b29cce5e6e0f146bbd25e7f52ad61f45dbcb6 (diff)
need to byteswap string table size before use for the alien endian a.out
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nm/nm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/nm/nm.c b/usr.bin/nm/nm.c
index bb8d22bcb6e..4049c752cad 100644
--- a/usr.bin/nm/nm.c
+++ b/usr.bin/nm/nm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nm.c,v 1.25 2004/05/04 23:09:07 deraadt Exp $ */
+/* $OpenBSD: nm.c,v 1.26 2004/07/11 07:08:46 mickey Exp $ */
/* $NetBSD: nm.c,v 1.7 1996/01/14 23:04:03 pk Exp $ */
/*
@@ -42,7 +42,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)nm.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] = "$OpenBSD: nm.c,v 1.25 2004/05/04 23:09:07 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: nm.c,v 1.26 2004/07/11 07:08:46 mickey Exp $";
#include <sys/param.h>
#include <sys/mman.h>
@@ -752,6 +752,7 @@ show_file(int count, int warn_fmt, const char *name, FILE *fp, off_t foff, union
free(names);
return(1);
}
+ stabsize = fix_long_order(stabsize, N_GETMID(head->aout));
MMAP(stab, stabsize, PROT_READ, MAP_PRIVATE|MAP_FILE,
fileno(fp), staboff);
if (stab == MAP_FAILED) {