From c66ac6ec86c4ed8f9a212b2f99a2b6550a559454 Mon Sep 17 00:00:00 2001 From: Christos Zoulas <christos@zoulas.com> Date: Tue, 15 Mar 2011 22:15:30 +0000 Subject: [PATCH] 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. --- src/apprentice.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- 2.40.0