git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@659 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2004/07/07 00:51:12... | ... |
@@ -704,6 +704,7 @@ static int cli_scanhtml(int desc, const char **virname, long int *scanned, const |
704 | 704 |
struct stat statbuf; |
705 | 705 |
int ret; |
706 | 706 |
|
707 |
+ |
|
707 | 708 |
cli_dbgmsg("in cli_scanhtml()\n"); |
708 | 709 |
|
709 | 710 |
if(fstat(desc, &statbuf) != 0) { |
... | ... |
@@ -723,9 +724,7 @@ static int cli_scanhtml(int desc, const char **virname, long int *scanned, const |
723 | 723 |
return CL_EMEM; |
724 | 724 |
} |
725 | 725 |
|
726 |
- newbuff2 = quoted_decode(membuff, statbuf.st_size); |
|
727 |
- newbuff = html_normalize(newbuff2, strlen(newbuff2)); |
|
728 |
- free(newbuff2); |
|
726 |
+ newbuff = html_normalize(membuff, statbuf.st_size); |
|
729 | 727 |
|
730 | 728 |
if(newbuff) { |
731 | 729 |
newbuff2 = remove_html_comments(newbuff); |
... | ... |
@@ -737,11 +736,12 @@ static int cli_scanhtml(int desc, const char **virname, long int *scanned, const |
737 | 737 |
*/ |
738 | 738 |
newbuff2 = html_normalize(newbuff, strlen(newbuff)); |
739 | 739 |
free(newbuff); |
740 |
+ newbuff = newbuff2; |
|
740 | 741 |
} |
741 | 742 |
|
742 |
- ret = cl_scanbuff(newbuff2, strlen(newbuff2), virname, root); |
|
743 |
+ ret = cl_scanbuff(newbuff, strlen(newbuff), virname, root); |
|
743 | 744 |
|
744 |
- free(newbuff2); |
|
745 |
+ free(newbuff); |
|
745 | 746 |
return ret; |
746 | 747 |
} |
747 | 748 |
|