Skip to content

Commit fd8bc2d

Browse files
committed
cups/string.c: Return if size is 0 (fixes CVE-2023-32324)
1 parent f8ea539 commit fd8bc2d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cups/string.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* String functions for CUPS.
33
*
4+
* Copyright © 2023 by OpenPrinting.
45
* Copyright © 2007-2019 by Apple Inc.
56
* Copyright © 1997-2007 by Easy Software Products.
67
*
@@ -730,6 +731,9 @@ _cups_strlcpy(char *dst, /* O - Destination string */
730731
size_t srclen; /* Length of source string */
731732

732733

734+
if (size == 0)
735+
return (0);
736+
733737
/*
734738
* Figure out how much room is needed...
735739
*/

0 commit comments

Comments
 (0)