Loading lib/url.c +1 −1 Original line number Diff line number Diff line Loading @@ -1043,7 +1043,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * headers. This should mostly be used to detect never-ending loops. */ arg = va_arg(param, long); if(arg < 0) if(arg < -1) return CURLE_BAD_FUNCTION_ARGUMENT; data->set.maxredirs = arg; break; Loading tests/libtest/lib501.c +4 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -44,6 +44,9 @@ int test(char *URL) test_setopt(curl, CURLOPT_HEADER, 1L); /* just verify that setting this to -1 is fine */ test_setopt(curl, CURLOPT_MAXREDIRS, -1L); res = curl_easy_perform(curl); test_cleanup: Loading Loading
lib/url.c +1 −1 Original line number Diff line number Diff line Loading @@ -1043,7 +1043,7 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * headers. This should mostly be used to detect never-ending loops. */ arg = va_arg(param, long); if(arg < 0) if(arg < -1) return CURLE_BAD_FUNCTION_ARGUMENT; data->set.maxredirs = arg; break; Loading
tests/libtest/lib501.c +4 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -44,6 +44,9 @@ int test(char *URL) test_setopt(curl, CURLOPT_HEADER, 1L); /* just verify that setting this to -1 is fine */ test_setopt(curl, CURLOPT_MAXREDIRS, -1L); res = curl_easy_perform(curl); test_cleanup: Loading