• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From fd8bc2d32589d1fd91fe1c0521be2a7c0462109e Mon Sep 17 00:00:00 2001
2From: Zdenek Dohnal <zdohnal@redhat.com>
3Date: Thu, 1 Jun 2023 12:04:00 +0200
4Subject: [PATCH] cups/string.c: Return if `size` is 0 (fixes CVE-2023-32324)
5
6Reference:https://github.com/OpenPrinting/cups/commit/fd8bc2d32589d1fd91fe1c0521be2a7c0462109e
7Conflict:NA
8
9---
10 cups/string.c | 4 ++++
11 1 file changed, 4 insertions(+)
12
13diff --git a/cups/string.c b/cups/string.c
14index 93cdad1..5def888 100644
15--- a/cups/string.c
16+++ b/cups/string.c
17@@ -1,6 +1,7 @@
18 /*
19  * String functions for CUPS.
20  *
21+ * Copyright © 2023 by OpenPrinting.
22  * Copyright © 2007-2019 by Apple Inc.
23  * Copyright © 1997-2007 by Easy Software Products.
24  *
25@@ -730,6 +731,9 @@ _cups_strlcpy(char       *dst,		/* O - Destination string */
26   size_t	srclen;			/* Length of source string */
27
28
29+  if (size == 0)
30+    return (0);
31+
32  /*
33   * Figure out how much room is needed...
34   */
35--
362.27.0
37
38