When freschclam is compiled with GCC 3.x (3.2.3 and 3.3 tested) with
-O2 -march=i686 -fomit-frame-pointer or something like that, it begins
generating errors on run like
ERROR: Can't get viruses2.md5 sum from ╗av.elektrapro.com
but only if using proxy. With GCC 2.96 or without -fomit-frame-pointer it
works OK.
After enabling warnings I found uninitialized strings in
get_md5_checksum() and get_database(). On freeing them, function arguments
got freed, too.
Below there is a quick kluge to fix it. A more clean solution probably
requires more work on that functions (to be honest, I am not very imressed
with them).
-- cut here --
--- clamav-20030522-orig/freshclam/manager.c Thu Apr 24 02:46:57 2003
+++ clamav-20030522/freshclam/manager.c Wed May 28 02:04:47 2003
@@ -387,7 +387,7 @@
char cmd[512], buffer[FBUFFSIZE];
char *md5sum, *ch, *tmp;
int i, j, bread, cnt;
- char *remotename, *authorization;
+ char *remotename = NULL, *authorization = NULL;
if(proxy) {
@@ -481,7 +481,7 @@
char cmd[512], buffer[FBUFFSIZE];
char *ch;
int bread, fd, i;
- char *remotename, *authorization;
+ char *remotename = NULL, *authorization = NULL;
if(proxy) {
-- cut here --
--
Best regards,
Nick
(GPG Key ID: 4396B2D0, fingerprint: 648E C3FE ACF6 A730 FF52 D717 776D 1CB0 4396 B2D0)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]