From 58f898f7b0f2fd901134d8ca8da9cb9863889d4f Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 25 May 1993 11:19:01 +0000 Subject: [PATCH] more thought it knew too much about the magic numbers of a.outs. Like, what about QMAGIC? It now uses N_BADMAG() to check --- usr.bin/more/more.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/usr.bin/more/more.c b/usr.bin/more/more.c index 812b458758ce..19b3ccc07933 100644 --- a/usr.bin/more/more.c +++ b/usr.bin/more/more.c @@ -410,13 +410,7 @@ magic(f, fs) struct exec ex; if (fread(&ex, sizeof(ex), 1, f) == 1) - switch(ex.a_magic) { - case OMAGIC: - case NMAGIC: - case ZMAGIC: - case 0405: - case 0411: - case 0177545: + if(!N_BADMAG(ex)) { prtf("\n******** %s: Not a text file ********\n\n", fs); (void)fclose(f); return(1);