]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add NULL check when copying collections.
authorMichael R Sweet <msweet@msweet.org>
Thu, 20 Jun 2024 12:56:38 +0000 (08:56 -0400)
committerMichael R Sweet <msweet@msweet.org>
Thu, 20 Jun 2024 12:56:38 +0000 (08:56 -0400)
cups/ipp.c

index 1c090838dd0d1c07b09bdb93fba8910082684f50..1f8cf7ed0aa4b66fde3f54f42bb12b0f99fa3aad 100644 (file)
@@ -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)