Skip to content

Commit

Permalink
Merge commit from fork
Browse files Browse the repository at this point in the history
cfGetPrinterAttributes5(): Validate response attributes before return
  • Loading branch information
zdohnal authored Sep 26, 2024
2 parents fb2a4a2 + 95576ec commit 08064b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cupsfilters/ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ cfGetPrinterAttributes5(http_t *http_printer,
ippDelete(response2);
}
}

// Check if the response is valid
if (!ippValidateAttributes(response))
{
ippDelete(response);
response = NULL;
}

if (have_http == 0) httpClose(http_printer);
if (uri) free(uri);
return (response);
Expand Down

0 comments on commit 08064b8

Please sign in to comment.