From: Christos Zoulas Date: Tue, 15 Mar 2011 22:15:30 +0000 (+0000) Subject: str_flags and num_mask are the same bytes in the union, so don't erroneously X-Git-Tag: FILE5_07~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c66ac6ec86c4ed8f9a212b2f99a2b6550a559454;p=file str_flags and num_mask are the same bytes in the union, so don't erroneously try to figure out if a test should be binary for non string types. PR/116. This affected tga file magic where the mask is 0xffffff and the binary test turned to ascii. --- diff --git a/src/apprentice.c b/src/apprentice.c index ed16939c..02f87c12 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.165 2011/01/16 19:30:36 rrt Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.166 2011/02/24 03:35:59 christos Exp $") #endif /* lint */ #include "magic.h" @@ -624,6 +624,8 @@ set_test_type(struct magic *mstart, struct magic *m) case FILE_DOUBLE: case FILE_BEDOUBLE: case FILE_LEDOUBLE: + mstart->flag |= BINTEST; + break; case FILE_STRING: case FILE_PSTRING: case FILE_BESTRING16: