Guard against bad servers. Older libcurl allowed unlimited
redirects. Newer libcurl default to max 30. Explicitly set
CURLOPT_MAXREDIRS to 6 (twice the number of redirects that seems
"reasonable"). This guards against badly setup servers that keep
redirecting. https://curl.se/libcurl/c/CURLOPT_MAXREDIRS.html
* debuginfod/debuginfod-client.c (init_handle): Add
CURLOPT_MAXREDIRS curl_easy_setopt_ck.
Signed-off-by: Mark Wielaard <mark@klomp.org>
}
curl_easy_setopt_ck(data->handle, CURLOPT_FILETIME, (long) 1);
curl_easy_setopt_ck(data->handle, CURLOPT_FOLLOWLOCATION, (long) 1);
+ curl_easy_setopt_ck(data->handle, CURLOPT_MAXREDIRS, (long) 6);
curl_easy_setopt_ck(data->handle, CURLOPT_FAILONERROR, (long) 1);
curl_easy_setopt_ck(data->handle, CURLOPT_NOSIGNAL, (long) 1);
if (h_callback)