]> git.ipfire.org Git - thirdparty/cups.git/commit
backend/ipp.c: Avoid NULL strcmp argument
authorzdohnal <zdohnal@redhat.com>
Fri, 14 Mar 2025 05:44:45 +0000 (06:44 +0100)
committerGitHub <noreply@github.com>
Fri, 14 Mar 2025 05:44:45 +0000 (06:44 +0100)
commit827a4726a5e97d262728b37b0146a75fd7c91a78
tree63c48dc65875979b48021aecc15d957a32e00adf
parentb2e14c974920e1d4fcaabf14bf70d8ebbe85793b
parenteabdf636ce3041a7664b5f3d28934efe17c39711
backend/ipp.c: Avoid NULL strcmp argument

It is possible for format to be NULL (as described in the function signature) which causes a segmentation fault when it is passed to strcmp. This patch changes the conditional to short-circuit if format is NULL and only call strcmp otherwise.