Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgi-bin/help-index.c: Check node->section before using it in strcmp() #81

Merged
merged 1 commit into from
Jan 29, 2021
Merged

cgi-bin/help-index.c: Check node->section before using it in strcmp() #81

merged 1 commit into from
Jan 29, 2021

Conversation

zdohnal
Copy link
Member

@zdohnal zdohnal commented Jan 29, 2021

Fixes a segfault in help.cgi, which happens if user tries to search in man pages.
Fedora bug #1921881

Fixes a segfault in help.cgi, which happens if user tries to search in man pages.
Fedora bug #1921881
@zdohnal
Copy link
Member Author

zdohnal commented Jan 29, 2021

Reproducer:

  1. go to localhost:631 when cups is configured to have web ui and the service is running
  2. go to 'Help' tab
  3. go to 'Man Pages'
  4. insert any text into 'Search' box and click on 'Search'

Result:
help.cgi segfaults, because it tries to compare section and node->section in strcmp(), but node->section is NULL.

Here is the backtrace and printing out node->section.

I'm not sure why node->section here is NULL (it is the node for accounting.html). The nodes are loaded from help.index but it contains a binary data, so I wasn't able to read it.

@michaelrsweet michaelrsweet self-assigned this Jan 29, 2021
@michaelrsweet michaelrsweet added bug Something isn't working priority-medium labels Jan 29, 2021
@michaelrsweet michaelrsweet added this to the v2.3.3op2 milestone Jan 29, 2021
@michaelrsweet michaelrsweet merged commit 8077d35 into OpenPrinting:master Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants