head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.05.19.18.38.11; author spz; state Exp; branches; next ; commitid 5x0jwzSnfR7nhsGG; desc @@ 1.1 log @deal with ctype functions faulting on invalid input on NetBSD 11 (by making invalid input less likely) While at it add LICENSE @ text @$NetBSD$ deal with ctype functions faulting on invalid input on NetBSD 11 --- reroute.c.orig 2026-05-16 21:29:09.369380690 +0000 +++ reroute.c @@@@ -6,7 +6,7 @@@@ */ #include -#include +#include "ctypeconv.h" #include "config.h" #include "global.h" @@@@ -22,14 +22,14 @@@@ reroute(char *route, char *address) name = atpos; while (--name >= address) - if (isspace(*name) || *name == '<') { + if (ISSPACE(*name) || *name == '<') { name++; break; } if (name < address) name++; - for (sp = atpos; (c = *sp); sp++) + for (sp = atpos; (c = (unsigned char)(*sp)); sp++) if (isspace(c) || c == '>') break; @