gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 11/73: strtoofft: Remove extraneous null check


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 11/73: strtoofft: Remove extraneous null check
Date: Tue, 24 Oct 2017 18:53:52 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 454dae0092d6f367fe486bdfd49f781329bf4500
Author: Benbuck Nason <address@hidden>
AuthorDate: Thu Oct 5 12:45:51 2017 -0700

    strtoofft: Remove extraneous null check
    
    Fixes #1950: curlx_strtoofft() doesn't fully protect against null 'str'
    argument.
    
    Closes #1952
---
 lib/strtoofft.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/strtoofft.c b/lib/strtoofft.c
index 807fc5454..363647737 100644
--- a/lib/strtoofft.c
+++ b/lib/strtoofft.c
@@ -219,7 +219,10 @@ CURLofft curlx_strtoofft(const char *str, char **endp, int 
base,
   curl_off_t number;
   errno = 0;
   *num = 0; /* clear by default */
-  while(str && *str && ISSPACE(*str))
+
+  DEBUGASSERT(str);
+
+  while(*str && ISSPACE(*str))
     str++;
   if('-' == *str) {
     if(endp)

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



reply via email to

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