Skip to content

Commit

Permalink
cups/string.c: Return if size is 0 (fixes CVE-2023-32324)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdohnal committed Jun 1, 2023
1 parent f8ea539 commit fd8bc2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cups/string.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* String functions for CUPS.
*
* Copyright © 2023 by OpenPrinting.
* Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products.
*
Expand Down Expand Up @@ -730,6 +731,9 @@ _cups_strlcpy(char *dst, /* O - Destination string */
size_t srclen; /* Length of source string */


if (size == 0)
return (0);

/*
* Figure out how much room is needed...
*/
Expand Down

0 comments on commit fd8bc2d

Please sign in to comment.