From: Michael R Sweet Date: Thu, 20 Jun 2024 12:56:38 +0000 (-0400) Subject: Add NULL check when copying collections. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd30d6e37c194c8bcac731d01849b1bfb6dc4f28;p=thirdparty%2Fcups.git Add NULL check when copying collections. --- diff --git a/cups/ipp.c b/cups/ipp.c index 1c090838dd..1f8cf7ed0a 100644 --- a/cups/ipp.c +++ b/cups/ipp.c @@ -1455,6 +1455,12 @@ ippCopyAttribute( { ipp_t *col = ippNew(); // Copy of collection + if (!col) + { + ippDeleteAttribute(dst, dstattr); + return (NULL); + } + ippCopyAttributes(col, srcval->collection, false, /*cb*/NULL, /*cb_data*/NULL); if (dstattr)