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

backend,scheduler/ipp.c: Fix 'printer-alert' invalid free #43

Merged
merged 1 commit into from
Nov 9, 2020
Merged

backend,scheduler/ipp.c: Fix 'printer-alert' invalid free #43

merged 1 commit into from
Nov 9, 2020

Conversation

zdohnal
Copy link
Member

@zdohnal zdohnal commented Nov 9, 2020

The fix is created by Bernhard Übelacker from apple/cups #5826.

The problem is described in detail here. I just removed:

--- a/backend/ipp.c
+++ b/backend/ipp.c
@@ -3026,6 +3026,7 @@ report_attr(ipp_attribute_t *attr)        /* I - Attribute */
           valptr += strlen(valptr);
           break;
 
+      case IPP_TAG_STRING :
       default :
          /*
          * Unsupported value type...

from the original patch - it looks okay without it (since the attribute is found as IPP_TAG_STRING and the tag doesn't have a case in switch, it will fallback into default: case automatically).

Regarding PWG standard IPP_TAG_STRING is the correct one - printer-alert is defined as octet-string (meaning ippAddOctetString must be used) and IPP_TAG_TEXT tag works with ippAddString, so based on this it looks like IPP_TAG_STRING is the correct one.

The fix is created by Bernhard Übelacker from apple/cups #5826.
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-high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants