Browse code

Fixed a typo in FSG preparsing

git-svn: trunk@1485

aCaB authored on 2005/04/19 22:15:11
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Apr 19 15:11:19 CEST 2005 (acab)
2
+  * bclamav/pe.c: Fixed a typo in FSG detection
3
+                  (reported by Didi Rieder <adrieder*sbox.tugraz.at>)
4
+
1 5
 Tue Apr 19 12:30:58 BST 2005 (trog)
2 6
 -----------------------------------
3 7
   * libclamav/unrar: Add copyright notice. Fix metadata ref bug.
... ...
@@ -708,7 +708,7 @@ int cli_scanpe(int desc, const char **virname, long int *scanned, const struct c
708 708
 		newedi = cli_readint32(support + 4) - EC32(optional_hdr.ImageBase); /* 1st dest */
709 709
 		newesi = cli_readint32(support + 8) - EC32(optional_hdr.ImageBase); /* Source */
710 710
 
711
-		if(newesi < EC32(section_hdr[i + 1].VirtualAddress || newesi >= EC32(section_hdr[i + 1].VirtualAddress) + EC32(section_hdr[i + 1].SizeOfRawData))) {
711
+		if(newesi < EC32(section_hdr[i + 1].VirtualAddress) || newesi >= EC32(section_hdr[i + 1].VirtualAddress) + EC32(section_hdr[i + 1].SizeOfRawData)) {
712 712
 		    cli_dbgmsg("FSG: Source buffer out of section bounds\n");
713 713
 		    free(support);
714 714
 		    break;
... ...
@@ -866,7 +866,7 @@ int cli_scanpe(int desc, const char **virname, long int *scanned, const struct c
866 866
 		}
867 867
 		oldep -= EC32(section_hdr[i + 1].VirtualAddress);
868 868
 
869
-		if(newesi < EC32(section_hdr[i + 1].VirtualAddress || newesi >= EC32(section_hdr[i + 1].VirtualAddress) + EC32(section_hdr[i + 1].SizeOfRawData))) {
869
+		if(newesi < EC32(section_hdr[i + 1].VirtualAddress) || newesi >= EC32(section_hdr[i + 1].VirtualAddress) + EC32(section_hdr[i + 1].SizeOfRawData)) {
870 870
 		    cli_dbgmsg("FSG: Source buffer out of section bounds\n");
871 871
 		    break;
872 872
 		}