git-svn: trunk@2360
Nigel Horne authored on 2006/10/10 00:51:33... | ... |
@@ -19,7 +19,7 @@ |
19 | 19 |
* Save the JavaScript embedded in an HTML file, then run the script, saving |
20 | 20 |
* the output in a file that is to be scanned, then remove the script file |
21 | 21 |
*/ |
22 |
-static char const rcsid[] = "$Id: js.c,v 1.8 2006/10/09 10:18:43 njh Exp $"; |
|
22 |
+static char const rcsid[] = "$Id: js.c,v 1.9 2006/10/09 15:51:33 njh Exp $"; |
|
23 | 23 |
|
24 | 24 |
#if HAVE_CONFIG_H |
25 | 25 |
#include "clamav-config.h" |
... | ... |
@@ -208,6 +208,8 @@ cli_scanjs(const char *dir, int desc) |
208 | 208 |
} |
209 | 209 |
} |
210 | 210 |
|
211 |
+ munmap(buf, size); |
|
212 |
+ |
|
211 | 213 |
rc = CL_SUCCESS; |
212 | 214 |
|
213 | 215 |
if(!done_header) |
... | ... |
@@ -220,23 +222,22 @@ cli_scanjs(const char *dir, int desc) |
220 | 220 |
|
221 | 221 |
fclose(fout); |
222 | 222 |
|
223 |
+#if 0 |
|
223 | 224 |
/* |
224 | 225 |
* Run NGS on the file |
225 | 226 |
*/ |
226 |
- /* |
|
227 | 227 |
interp = create_interp(); |
228 | 228 |
|
229 | 229 |
if(!js_eval_file(interp, script_filename)) { |
230 | 230 |
cli_warnmsg("JS failed: %s\n", js_error_message(interp)); |
231 | 231 |
rc = CL_EIO; |
232 | 232 |
} |
233 |
- js_destroy_interp(interp);*/ |
|
233 |
+ js_destroy_interp(interp); |
|
234 |
+#endif |
|
234 | 235 |
|
235 | 236 |
if(!cli_leavetemps_flag) |
236 | 237 |
unlink(script_filename); |
237 | 238 |
} |
238 |
- |
|
239 |
- munmap(buf, size); |
|
240 | 239 |
return CL_CLEAN; |
241 | 240 |
} |
242 | 241 |
|
... | ... |
@@ -280,7 +281,7 @@ cli_pmemstr(const char *haystack, size_t hs, const char *needle, size_t ns) |
280 | 280 |
|
281 | 281 |
return NULL; |
282 | 282 |
} |
283 |
- |
|
283 |
+ |
|
284 | 284 |
#else |
285 | 285 |
|
286 | 286 |
int |