From eac879b493db2d53febaa4447f356d6ea93e76ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20=C3=89LIE?= Date: Sat, 9 Dec 2023 22:17:06 +0100 Subject: [PATCH] ctlinnd trace: Check the validity of a channel ... otherwise innd dies. close #287 --- doc/pod/news.pod | 4 ++++ innd/cc.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/pod/news.pod b/doc/pod/news.pod index 2da930054..1a8110970 100644 --- a/doc/pod/news.pod +++ b/doc/pod/news.pod @@ -54,6 +54,10 @@ is not. Thanks to Enrik Berkhan for the patch for B. =item * +B no longer dies when C is run on an invalid channel. + +=item * + INN now properly handles header field names starting with a leading dot: =over 2 diff --git a/innd/cc.c b/innd/cc.c index 993e2db60..2d38a5bfa 100644 --- a/innd/cc.c +++ b/innd/cc.c @@ -1864,7 +1864,8 @@ CCtrace(char *av[]) case '7': case '8': case '9': - if ((cp = CHANfromdescriptor(atoi(p))) == NULL) + cp = CHANfromdescriptor(atoi(p)); + if (cp == NULL || cp->Type == CTfree) return CCnochannel; CHANtracing(cp, Flag); break;