]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Make sure we duplicate strings returned by cgiGetTextField, just as we do for cgiGetV...
authorMichael R Sweet <msweet@msweet.org>
Wed, 14 Aug 2024 00:32:08 +0000 (20:32 -0400)
committerMichael R Sweet <msweet@msweet.org>
Wed, 14 Aug 2024 00:32:08 +0000 (20:32 -0400)
cgi-bin/var.c

index 6ad945d5a7c066355ecdd4eeef462ff402dd79c0..a4993ffec24fb5437a89c3cfce04064090e05364 100644 (file)
@@ -288,7 +288,7 @@ cgiGetTextfield(const char *name)   /* I - Name of form field */
     value = NULL;
   }
 
-  return (value);
+  return (value ? strdup(value) : NULL);
 }