From: Zdenek Dohnal Date: Fri, 29 Jan 2021 07:56:17 +0000 (+0100) Subject: cgi-bin/help-index.c: Check node->section before using it in strcmp() X-Git-Tag: v2.3.3op2~10^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F81%2Fhead;p=thirdparty%2Fcups.git cgi-bin/help-index.c: Check node->section before using it in strcmp() Fixes a segfault in help.cgi, which happens if user tries to search in man pages. Fedora bug #1921881 --- diff --git a/CHANGES-OPENPRINTING.md b/CHANGES-OPENPRINTING.md index cf26c8df41..1eaabcb7ca 100644 --- a/CHANGES-OPENPRINTING.md +++ b/CHANGES-OPENPRINTING.md @@ -12,6 +12,7 @@ Changes in CUPS v2.3.3op2 - The scheduler's systemd service file now waits for the nslcd service to start (Issue #69) - Root certificates were incorrectly stored in "~/.cups/ssl". +- Fixed segfault in help.cgi when searching in man pages Changes in CUPS v2.3.3op1 diff --git a/cgi-bin/help-index.c b/cgi-bin/help-index.c index ce97e47a43..3da1010e6a 100644 --- a/cgi-bin/help-index.c +++ b/cgi-bin/help-index.c @@ -579,7 +579,7 @@ helpSearchIndex(help_index_t *hi, /* I - Index */ */ for (; node; node = (help_node_t *)cupsArrayNext(hi->nodes)) - if (section && strcmp(node->section, section)) + if (node->section && section && strcmp(node->section, section)) continue; else if (filename && strcmp(node->filename, filename)) continue;