Bug 10986 - Bug in stats HostID code
Bug in stats HostID code
Status: RESOLVED FIXED
Product: ClamAV
Classification: ClamAV
Component: clamd
stable
x86_64 Mac OS
: P3 normal
: 0.98.4
Assigned To: Shawn Webb
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-08 03:35 EDT by Shawn Webb
Modified: 2014-05-08 03:36 EDT (History)
0 users

See Also:
QA Contact:


Attachments
Stats HostID OSX Patch (332 bytes, patch)
2014-05-08 03:36 EDT, Shawn Webb
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Webb 2014-05-08 03:35:09 EDT
An improper return value is passed back from the clamav_stats_get_hostid() function in ClamAV 0.98.3. This only affects OSX systems. The following patch fixes the issue (patch is also attached):

diff --git a/libclamav/stats.c b/libclamav/stats.c
index bf7687a..4510170 100644
--- a/libclamav/stats.c
+++ b/libclamav/stats.c
@@ -595,6 +595,8 @@ char *clamav_stats_get_hostid(void *cbdata)
 
         return buf;
     }
+
+    return strdup(STATS_ANON_UUID);
 #else
     buf = internal_get_host_id();
     if (!(buf))
Comment 1 Shawn Webb 2014-05-08 03:36:08 EDT
Created attachment 6614 [details]
Stats HostID OSX Patch
Comment 2 Shawn Webb 2014-05-08 03:36:49 EDT
Fixed in master with commit 9e47301bc96964b33fe578170296c780924b3b7b.