Skip to content

Commit

Permalink
Don't allow nul character as delimiter.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Feb 26, 2025
1 parent 503b02c commit c285d99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cups/array.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Sorted array routines for CUPS.
//
// Copyright © 2021-2022 by OpenPrinting.
// Copyright © 2021-2025 by OpenPrinting.
// Copyright © 2007-2014 by Apple Inc.
// Copyright © 1997-2007 by Easy Software Products.
//
Expand Down Expand Up @@ -112,7 +112,7 @@ cupsArrayAddStrings(cups_array_t *a, // I - Array
if (!a)
return (false);

if (!a || !s || !*s)
if (!a || !s || !*s || !delim)
return (true);

if (delim == ' ')
Expand Down

0 comments on commit c285d99

Please sign in to comment.