Skip to content

Commit

Permalink
Merge pull request #81 from zdohnal/help-index-segfault
Browse files Browse the repository at this point in the history
cgi-bin/help-index.c: Check node->section before using it in strcmp()
  • Loading branch information
michaelrsweet authored Jan 29, 2021
2 parents 49bfed3 + edeb8af commit 8077d35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES-OPENPRINTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cgi-bin/help-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8077d35

Please sign in to comment.