[PATCH] setopt: Fix disabling all protocols
authorDaniel Gustafsson <daniel@yesql.se>
Tue, 27 Feb 2024 14:43:56 +0000 (15:43 +0100)
committerGuilherme Puida Moreira <guilherme@puida.xyz>
Tue, 2 Apr 2024 23:02:10 +0000 (20:02 -0300)
commit0a6b2e8688794fa138be2fbb53d65b1d3fc0c4fd
tree4b75419c4daa35a76703480330264d5efa7f3ec1
parenta186688e97c51aa3fc903874dafff52d22551125
[PATCH] setopt: Fix disabling all protocols

When disabling all protocols without enabling any, the resulting
set of allowed protocols remained the default set.  Clearing the
allowed set before inspecting the passed value from --proto make
the set empty even in the errorpath of no protocols enabled.

Co-authored-by: Dan Fandrich <dan@telarity.com>
Reported-by: Dan Fandrich <dan@telarity.com>
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Closes: #13004
Backported by: Guilherme Puida Moreira <guilherme@puida.xyz>
 * Small change in the Makefile to add a new test.

Gbp-Pq: Name CVE-2024-2004.patch
lib/setopt.c
tests/data/Makefile.inc
tests/data/test1474 [new file with mode: 0644]