[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] bug in validate_messageid



In leafnode-2.0b8_ma10pre3.3, a gotcha in validate_messageid().

After carefully calculating the number of chars between @ and >, it then
uses that number of chars from the beginning of the message rather than at
@ +1.


patch -p1 << \EOF
diff -ru leafnode-2.0b8_ma10pre3.3.orig/nntpd.c leafnode-2.0b8_ma10pre3.3/nntpd.c
--- leafnode-2.0b8_ma10pre3.3.orig/nntpd.c	2002-06-16 15:18:34.000000000 -0700
+++ leafnode-2.0b8_ma10pre3.3/nntpd.c	2002-07-07 02:58:42.000000000 -0700
@@ -1255,7 +1255,7 @@
     l = strcspn(r, ">");
     s = critmalloc(l+1, "validate_messageid");
     *s = '\0';
-    strncat(s, m, l);
+    strncat(s, r, l);
     l = is_validfqdn(s);
     free(s);
     return l;
EOF


Cheers,
mrc
-- 
     Mike Castle      dalgoda@xxxxxxxxxxxxx      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list