From dd30d6e37c194c8bcac731d01849b1bfb6dc4f28 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 20 Jun 2024 08:56:38 -0400 Subject: [PATCH] Add NULL check when copying collections. --- cups/ipp.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.47.3