gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 98/219: vauth/cleartext: Don't send the authzid if


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 98/219: vauth/cleartext: Don't send the authzid if it is empty
Date: Wed, 22 May 2019 19:17:17 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit f0950acc07b46f74ea5a54bbe50f081072fc2a68
Author: Steve Holme <address@hidden>
AuthorDate: Wed Apr 17 23:06:05 2019 +0100

    vauth/cleartext: Don't send the authzid if it is empty
    
    Follow up to 762a292f.
---
 lib/vauth/cleartext.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/vauth/cleartext.c b/lib/vauth/cleartext.c
index 0017d5836..8f972e31c 100644
--- a/lib/vauth/cleartext.c
+++ b/lib/vauth/cleartext.c
@@ -73,7 +73,7 @@ CURLcode Curl_auth_create_plain_message(struct Curl_easy 
*data,
 
   *outlen = 0;
   *outptr = NULL;
-  zlen = strlen(authzid);
+  zlen = (authzid == NULL ? 0 : strlen(authzid));
   clen = strlen(authcid);
   plen = strlen(passwd);
 
@@ -87,7 +87,8 @@ CURLcode Curl_auth_create_plain_message(struct Curl_easy 
*data,
     return CURLE_OUT_OF_MEMORY;
 
   /* Calculate the reply */
-  memcpy(plainauth, authzid, zlen);
+  if(zlen != 0)
+    memcpy(plainauth, authzid, zlen);
   plainauth[zlen] = '\0';
   memcpy(plainauth + zlen + 1, authcid, clen);
   plainauth[zlen + clen + 1] = '\0';

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



reply via email to

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