[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>
Sat, 19 Jul 2025 19:04:59 +0000 (21:04 +0200)
commit00f5ca6f24be523e8d02c7d6473962724ca4aa94
tree71fd10da7143c3757b3736d8e0a70e6b29006b52
parenteec1a806afa4b05bf4718328a2bfb9b43cbd052b
[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]