[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DNS RBL fix



It did not work.  And it could not.

Index: smtpserver/mxverify.c
===================================================================
RCS file: /cvsroot/zmailer/smtpserver/mxverify.c,v
retrieving revision 1.30
diff -u -r1.30 mxverify.c
--- smtpserver/mxverify.c       2002/09/18 08:23:08     1.30
+++ smtpserver/mxverify.c       2003/04/15 15:12:47
@@ -686,7 +686,7 @@
      char **msgp;
 {
        char hbuf[2000], *s, *suf;
-       /* int hspc; */
+       int hspc;
        struct hostent *hp;
        int has_ok = 0;
 
@@ -705,7 +705,7 @@
        }
 
        suf = hbuf + strlen(hbuf);
-       /* hspc = sizeof(hbuf)-strlen(hbuf)-1; */
+       hspc = sizeof(hbuf)-strlen(hbuf)-2;
 
        while (*rbldomain) {
          /* "rbldomain" is possibly a COLON-demarked set of
@@ -718,9 +718,10 @@
          s = strchr(rbldomain, ':');
          if (s) *s = 0;
          if (strcmp(rbldomain,"+") == 0)
-           strcpy (suf, "rbl.maps.vix.com");
+           strncpy (suf, "rbl.maps.vix.com",hspc);
          else
-           strcpy (suf, rbldomain);
+           strncpy (suf, rbldomain,hspc);
+         suf[hspc]='\0';
 
          if (s) {
            *s = ':';
@@ -733,11 +734,10 @@
             That way the lookup should never use resolver's  SEARCH
             suffix set. */
 
-         s = suf + strlen(suf);
-         if (s > hbuf) --s;
+         s = suf + strlen(suf) - 1;
          if (*s != '.') {
-           *suf++ = '.';
-           *suf = 0;
+           *++s = '.';
+           *++s = 0;
          }
 


-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi