git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1397 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2005/03/17 05:59:24... | ... |
@@ -1177,7 +1177,7 @@ int cli_scanpe(int desc, const char **virname, long int *scanned, const struct c |
1177 | 1177 |
} |
1178 | 1178 |
|
1179 | 1179 |
if(buff[0] != '\xb8' || cli_readint32(buff + 1) != EC32(section_hdr[nsections - 1].VirtualAddress) + EC32(optional_hdr.ImageBase)) { |
1180 |
- if(buff[0] != '\xb8' || (nsections > 1 && cli_readint32(buff + 1) != EC32(section_hdr[nsections - 2].VirtualAddress) + EC32(optional_hdr.ImageBase))) |
|
1180 |
+ if(nsections < 2 || buff[0] != '\xb8' || cli_readint32(buff + 1) != EC32(section_hdr[nsections - 2].VirtualAddress) + EC32(optional_hdr.ImageBase)) |
|
1181 | 1181 |
found = 0; |
1182 | 1182 |
else |
1183 | 1183 |
found = 1; |