On Tue, 28 Sep 2021, Ray Satiro via curl-library wrote:

and in CURLOPT_PROTOCOLS setopt:

long allowed_protocols = va_arg(param, long);

if((allowed_protocols&CURLPROTO_EXTENDED_FLAG) && allowed_protocols !=
CURLPROTO_ALL)
  /* problem */

Since we would also get the problem if we set CURLPROTO_FOO *only*, the check would probably have to be:

#if SIZEOF_LONG < SIZEOF_CURL_OFF_T
 if(allowed_protocols&CURLPROTO_EXTENDED_FLAG)
   return ERROR;
#endif

... but, this also then assumes that it will actually read the *correct* 4 bytes from the 8 that were pushed on the stack and I don't think it is guaranteed in the C language so there's a risk that the check won't work.

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to