]> diplodocus.org Git - nmh/blobdiff - sbr/mf.c
Added -D_FORTIFY_SOURCE=2 now that the build is clean with it.
[nmh] / sbr / mf.c
index 84f1afa94dfcc77a8ce9b9f4803b3ed469cfbe90..d99d2b387d8ad2d245751d32ede9c34d742fcc42 100644 (file)
--- a/sbr/mf.c
+++ b/sbr/mf.c
@@ -8,8 +8,6 @@
  */
 
 #include <h/mf.h>
-#include <ctype.h>
-#include <stdio.h>
 #include <h/utils.h>
 
 /*
@@ -232,6 +230,15 @@ getadrx (const char *addrs)
            break;
        }
 
+    /*
+     * Reject the address if key fields contain 8bit characters
+     */
+
+    if (contains8bit(mbox, NULL) || contains8bit(host, NULL) ||
+       contains8bit(path, NULL) || contains8bit(grp, NULL)) {
+       strcpy(err, "Address contains 8-bit characters");
+    }
+
     if (err[0])
        for (;;) {
            switch (last_lex) {