more thought it knew too much about the magic numbers of
a.outs. Like, what about QMAGIC? It now uses N_BADMAG() to check
This commit is contained in:
parent
64f9e04df7
commit
58f898f7b0
@ -410,13 +410,7 @@ magic(f, fs)
|
|||||||
struct exec ex;
|
struct exec ex;
|
||||||
|
|
||||||
if (fread(&ex, sizeof(ex), 1, f) == 1)
|
if (fread(&ex, sizeof(ex), 1, f) == 1)
|
||||||
switch(ex.a_magic) {
|
if(!N_BADMAG(ex)) {
|
||||||
case OMAGIC:
|
|
||||||
case NMAGIC:
|
|
||||||
case ZMAGIC:
|
|
||||||
case 0405:
|
|
||||||
case 0411:
|
|
||||||
case 0177545:
|
|
||||||
prtf("\n******** %s: Not a text file ********\n\n", fs);
|
prtf("\n******** %s: Not a text file ********\n\n", fs);
|
||||||
(void)fclose(f);
|
(void)fclose(f);
|
||||||
return(1);
|
return(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user