[PATCH] setopt: Fix disabling all protocols
authorDaniel Gustafsson <daniel@yesql.se>
Tue, 27 Feb 2024 14:43:56 +0000 (15:43 +0100)
committerSamuel Henrique <samueloph@debian.org>
Sun, 9 Mar 2025 10:45:45 +0000 (10:45 +0000)
commit0849799ea8d8181dd5dabdeb4b4227427874c202
tree9e66d88510f633e3ba59d53216ecded6783c768c
parentc112bf2c42fa41627963a02c5bfbc04e816e44cd
[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]