We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d748da commit 44ac013Copy full SHA for 44ac013
1 file changed
cgi-bin/var.c
@@ -1,7 +1,7 @@
1
/*
2
* CGI form variable and array functions for CUPS.
3
*
4
- * Copyright © 2020-2025 by OpenPrinting.
+ * Copyright © 2020-2026 by OpenPrinting.
5
* Copyright © 2007-2019 by Apple Inc.
6
* Copyright © 1997-2005 by Easy Software Products.
7
@@ -88,8 +88,11 @@ cgiCheckVariables(const char *names) /* I - Variables to look for */
88
while (*names == ' ' || *names == ',')
89
names ++;
90
91
- for (s = name; *names != '\0' && *names != ' ' && *names != ','; s ++, names ++)
92
- *s = *names;
+ for (s = name; *names != '\0' && *names != ' ' && *names != ','; names ++)
+ {
93
+ if (s < (name + sizeof(name) - 1))
94
+ *s++ = *names;
95
+ }
96
97
*s = 0;
98
if (name[0] == '\0')
0 commit comments