]> git.ipfire.org Git - thirdparty/cups.git/commit
_ppdCacheAssignPresets(): Added NULL checks for option choice properties record
authorTill Kamppeter <till.kamppeter@gmail.com>
Sun, 24 Sep 2023 22:17:17 +0000 (00:17 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Sun, 24 Sep 2023 22:17:17 +0000 (00:17 +0200)
commit97e448580f5f26d1be9d4e0d03f76efb0cbc8d5d
treed1042e530d0fdf82d33404126f13c9e222252692
parentb75275f6239e3ffac884b0b9e0945970e3b3bd54
_ppdCacheAssignPresets(): Added NULL checks for option choice properties record

Static analysis of code, GitHub code scanning, found missing NULL
checks for allocating memory for option choice properties records
(gives NULL when out of memory) and for grabbing the records from a
CUPS array (should now never happen as we now skip the option on the
first memory allocation failure).

Added appropriate NULL checks. Now in case of unsufficient memory the
current option gets skipped on the first failed calloc() call.
cups/ppd-cache.c