File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Changes in CUPS v2.4.17 (YYYY-MM-DD)
3434- Fixed a bug in the IPP backend when SNMP was disabled.
3535- Fixed a crash bug in the rastertoepson filter.
3636- Fixed the range check for job password strings.
37+ - Fixed a bug in cgiCheckVariables.
3738
3839
3940Changes in CUPS v2.4.16 (2025-12-04)
Original file line number Diff line number Diff line change 11/*
22 * CGI form variable and array functions for CUPS.
33 *
4- * Copyright © 2020-2024 by OpenPrinting.
4+ * Copyright © 2020-2026 by OpenPrinting.
55 * Copyright © 2007-2019 by Apple Inc.
66 * Copyright © 1997-2005 by Easy Software Products.
77 *
@@ -95,8 +95,11 @@ cgiCheckVariables(const char *names) /* I - Variables to look for */
9595 while (* names == ' ' || * names == ',' )
9696 names ++ ;
9797
98- for (s = name ; * names != '\0' && * names != ' ' && * names != ',' ; s ++ , names ++ )
99- * s = * names ;
98+ for (s = name ; * names != '\0' && * names != ' ' && * names != ',' ; names ++ )
99+ {
100+ if (s < (name + sizeof (name ) - 1 ))
101+ * s ++ = * names ;
102+ }
100103
101104 * s = 0 ;
102105 if (name [0 ] == '\0' )
@@ -633,7 +636,7 @@ cgi_add_variable(const char *name, /* I - Variable name */
633636
634637 if ((var -> values = calloc ((size_t )element + 1 , sizeof (char * ))) == NULL )
635638 {
636- /*
639+ /*
637640 * Rollback changes
638641 */
639642
You can’t perform that action at this time.
0 commit comments