Browse code

libclamav/matcher-ac.c: fix handling of VI/MACRO special offsets (bb#1957)

Tomasz Kojm authored on 2010/04/26 23:09:01
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Apr 26 16:06:56 CEST 2010 (tk)
2
+----------------------------------
3
+ * libclamav/matcher-ac.c: fix handling of VI/MACRO special offsets (bb#1957)
4
+
1 5
 Fri Apr 23 21:38:19 EEST 2010 (edwin)
2 6
 -------------------------------------
3 7
  * configure: fix Apple-style universal build (bb #1988).
... ...
@@ -1182,13 +1182,13 @@ int cli_ac_scanbuff(const unsigned char *buffer, uint32_t length, const char **v
1182 1182
 			    continue;
1183 1183
 			}
1184 1184
 			realoff = offset + bp - pt->prefix_length;
1185
-			if(patt->offdata[0] == CLI_OFF_VERSION) {
1185
+			if(pt->offdata[0] == CLI_OFF_VERSION) {
1186 1186
 			    if(!cli_hashset_contains_maybe_noalloc(&mdata->vinfo, realoff)) {
1187 1187
 				pt = pt->next_same;
1188 1188
 				continue;
1189 1189
 			    }
1190 1190
 			    cli_dbgmsg("cli_ac_scanbuff: VI match for offset %x\n", realoff);
1191
-			} else if (patt->offdata[0] == CLI_OFF_MACRO) {
1191
+			} else if(pt->offdata[0] == CLI_OFF_MACRO) {
1192 1192
 			    mdata->macro_lastmatch[patt->offdata[1]] = realoff;
1193 1193
 			    pt = pt->next_same;
1194 1194
 			    continue;