Browse code

allow offsets for all buffer types

git-svn: trunk@5027

Tomasz Kojm authored on 2009/04/07 05:17:25
Showing 2 changed files
... ...
@@ -914,7 +914,7 @@ int cli_ac_scanbuff(const unsigned char *buffer, uint32_t length, const char **v
914 914
 			realoff = offset + bp - pt->prefix_length;
915 915
 
916 916
 			if(pt->offset && (!pt->sigid || pt->partno == 1)) {
917
-			    if((fd == -1 && !ftype) || !cli_validatesig(ftype, pt->offset, realoff, &info, fd, pt->virname)) {
917
+			    if(!cli_validatesig(ftype, pt->offset, realoff, &info, fd, pt->virname)) {
918 918
 				pt = pt->next_same;
919 919
 				continue;
920 920
 			    }
... ...
@@ -214,9 +214,9 @@ int cli_bm_scanbuff(const unsigned char *buffer, uint32_t length, const char **v
214 214
 
215 215
 		if(found && p->length + p->prefix_length == j) {
216 216
 
217
-		    if(p->target || p->offset) {
217
+		    if(p->offset) {
218 218
 			off = offset + i - p->prefix_length - BM_MIN_LENGTH + BM_BLOCK_SIZE;
219
-			if((fd == -1 && !ftype) || !cli_validatesig(ftype, p->offset, off, &info, fd, p->virname)) {
219
+			if(!cli_validatesig(ftype, p->offset, off, &info, fd, p->virname)) {
220 220
 			    p = p->next;
221 221
 			    continue;
222 222
 			}