diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-10-15 17:06:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-15 17:06:53 -0400 |
commit | e35d176c54420e940c32cff2fe8d638b89630dde (patch) | |
tree | 5303e50f301facd0d0decfabe068130ba20ed5ee /cgi-bin | |
parent | 2a06655e5c1925f09d5a2e38cd073eb1b6f069ad (diff) | |
parent | eda46e3aac94d42e4199d95befe99ff83afb098f (diff) | |
download | cups-e35d176c54420e940c32cff2fe8d638b89630dde.tar.gz |
Merge pull request #5621 from zdohnal/cgigetarray-sigsegv
SIGSEGV in CUPS web ui when adding a printer
Diffstat (limited to 'cgi-bin')
-rw-r--r-- | cgi-bin/var.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cgi-bin/var.c b/cgi-bin/var.c index 306375bd6..fb9d051c0 100644 --- a/cgi-bin/var.c +++ b/cgi-bin/var.c @@ -170,6 +170,9 @@ cgiGetArray(const char *name, /* I - Name of array variable */ if (element < 0 || element >= var->nvalues) return (NULL); + if (var->values[element] == NULL) + return (NULL); + return (strdup(var->values[element])); } |