-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tomasz Kojm wrote: > On Wed, 28 Feb 2007 11:09:16 +0100 > Gianluigi Tiesi <[EMAIL PROTECTED]> wrote: > >> alex wrote: >>> Dears all: >>> >>> I have read the source code of clamav 0.90 and found a strange code in >>> filetype.c. >>> >>> There is an expressioniIn 233 line of filetype.c : >>> >>> if(!iscntrl(buf[i]) && !isprint(buf[i]) && !internat[buf[i] >>> & 0xff]) >>> >>> and this expression would ALWAYS be false. >>> >>> I want to know if i am wrong ? >>> >>> Thanks >>> >> I've noticed it too, in my port I have changed it to: >> >> if(!(iscntrl(buf[i]) || isprint(buf[i])) || !internat[buf[i] & xff]) > > This one is much worse because it will lead to many false nagatives with HTML > and mail files. > yes so I've never posted it as official patch, btw I do the check for whole magic buffer (150?) to be more realable also I've noticed the internat table is quite different from the one in file (magic) utility.
Regards - -- Gianluigi Tiesi <[EMAIL PROTECTED]> EDP Project Leader Netfarm S.r.l. - http://www.netfarm.it/ Free Software: http://oss.netfarm.it/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF5ZAA3UE5cRfnO04RAsEYAJ4xTnInT3MGZtVFCNifm1qTu9ZiwwCghdS9 W2WV6qffIUw4O2lQ9Ugczzc= =VfLv -----END PGP SIGNATURE----- _______________________________________________ http://lurker.clamav.net/list/clamav-devel.html Please submit your patches to our Bugzilla: http://bugs.clamav.net
