gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 241/254: setopt: check CURLOPT_ADDRESS_SCOPE option


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 241/254: setopt: check CURLOPT_ADDRESS_SCOPE option range
Date: Sat, 17 Jun 2017 16:54:33 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.

commit 844896d06416c9fdcacad5159f2a1a1d0293b9e5
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Jun 9 01:00:23 2017 +0200

    setopt: check CURLOPT_ADDRESS_SCOPE option range
    
    ... and return error instead of triggering an assert() when being way
    out of range.
---
 lib/url.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/url.c b/lib/url.c
index b33579c70..84822d9bc 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2616,7 +2616,10 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption 
option,
      * know that an unsigned int will always hold the value so we blindly
      * typecast to this type
      */
-    data->set.scope_id = curlx_sltoui(va_arg(param, long));
+    arg = va_arg(param, long);
+    if((arg < 0) || (arg > 0xf))
+      return CURLE_BAD_FUNCTION_ARGUMENT;
+    data->set.scope_id = curlx_sltoui(arg);
     break;
 
   case CURLOPT_PROTOCOLS:

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]