diff --git a/clamav-devel/ChangeLog b/clamav-devel/ChangeLog index 1749ed546..6a605dc32 100644 --- a/clamav-devel/ChangeLog +++ b/clamav-devel/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 19 02:53:46 CEST 2004 (tk) +---------------------------------- + * libclamav/matcher.c: fix signature target type validation for data files + of unknown type + Sun Oct 17 18:33:10 CEST 2004 (tk) ---------------------------------- V 0.80 diff --git a/clamav-devel/libclamav/matcher.c b/clamav-devel/libclamav/matcher.c index e9c0f5b8e..060ec6d9d 100644 --- a/clamav-devel/libclamav/matcher.c +++ b/clamav-devel/libclamav/matcher.c @@ -150,11 +150,12 @@ static long int cli_caloff(const char *offstr, int fd) int cli_validatesig(unsigned short target, unsigned short ftype, const char *offstr, unsigned long int fileoff, int desc, const char *virname) { + if(target) { if(target >= TARGET_TABLE_SIZE) { cli_errmsg("Bad target in signature (%s)\n", virname); return 0; - } else if(ftype) { + } else { if(targettab[target] != ftype) { cli_dbgmsg("Type: %d, expected: %d (%s)\n", ftype, targettab[target], virname); return 0;