[Pkg-dspam-misc] Bug#644794: [PATCH] Fix buffer lengths for IPv6 adresses logging

Julien Valroff julien at kirya.net
Sun Oct 9 13:11:10 UTC 2011


Hi,

Here is an attempt to fix Debian bug #644794 [0] stating the logged
IPv6 addresses are truncated.

Cheers,
Julien

[0] http://bugs.debian.org/644794

---
 CHANGELOG   |    2 ++
 src/dspam.c |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 0ca9952..5098f71 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,5 @@
+[20111009:1500] jvalroff: Fix buffer lengths for IPv6 adresses logging
+
 [20111001:1200] sbajic: Fix typo and formatting issues in dspam.conf
 
 [20111001:1030] sbajic: Fix compiler warnings (unused function) in MySQL driver
diff --git a/src/dspam.c b/src/dspam.c
index 2668aba..48c12aa 100644
--- a/src/dspam.c
+++ b/src/dspam.c
@@ -409,7 +409,7 @@ process_message (
       strcmp(_ds_pref_val(ATX->PTX, "optOutClamAV"), "on"))
   {
     if (has_virus(message)) {
-      char ip[32];
+      char ip[46];
       CTX->result = DSR_ISSPAM;
       CTX->probability = 1.0;
       CTX->confidence = 1.0;
@@ -3823,7 +3823,7 @@ MEM_ALLOC:
  */
 
 int tracksource(DSPAM_CTX *CTX) {
-  char ip[32];
+  char ip[46];
 
   if (!dspam_getsource (CTX, ip, sizeof (ip)))
   {
@@ -4010,7 +4010,7 @@ int is_blacklisted(DSPAM_CTX *CTX, AGENT_CTX *ATX) {
   /* No cygwin support for IP Blacklisting */
   return 0;
 #else
-  char ip[32];
+  char ip[46];
   int bad = 0;
   struct attribute *attrib;
   struct addrinfo *res = NULL;
-- 
1.7.6.3





More information about the Pkg-dspam-misc mailing list