]> git.ipfire.org Git - thirdparty/cups.git/commit
cgi-bin/var.c: Fix return value if the text is invalid
authorzdohnal <zdohnal@redhat.com>
Thu, 16 May 2024 13:45:53 +0000 (15:45 +0200)
committerGitHub <noreply@github.com>
Thu, 16 May 2024 13:45:53 +0000 (15:45 +0200)
commitaa28be916f4d0d11260529a1a682e1812c69a97a
tree43e65fb95982122d343fcd68c74286f5094f8be4
parent09ab94d5c07cb57f7075837c32df298e2d3faf3a
parentf317719d1ce924bccd40b831e5e2d28cb4475b1a
cgi-bin/var.c: Fix return value if the text is invalid

In `cgiGetTextfield()`, if the original value contains double quote, which is forbidden for text, we free the variable and move the next variable from array to its place. However, the return value still contains the original value of freed pointer, and shows garbage when used.

Set it NULL, since we don't have any value to return for the requested name.