httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1800919 - /httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
Date Wed, 05 Jul 2017 19:44:31 GMT
Author: wrowe
Date: Wed Jul  5 19:44:30 2017
New Revision: 1800919

URL: http://svn.apache.org/viewvc?rev=1800919&view=rev
Log:
Correct string scope to prevent duplicated values for subsequent tokens.


Modified:
    httpd/httpd/trunk/modules/aaa/mod_auth_digest.c

Modified: httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_auth_digest.c?rev=1800919&r1=1800918&r2=1800919&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_digest.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_digest.c Wed Jul  5 19:44:30 2017
@@ -952,13 +952,13 @@ static int get_digest_rec(request_rec *r
 
         /* find value */
 
+        vv = 0;
         if (auth_line[0] == '=') {
             auth_line++;
             while (apr_isspace(auth_line[0])) {
                 auth_line++;
             }
 
-            vv = 0;
             if (auth_line[0] == '\"') {         /* quoted string */
                 auth_line++;
                 while (auth_line[0] != '\"' && auth_line[0] != '\0') {
@@ -977,8 +977,8 @@ static int get_digest_rec(request_rec *r
                     value[vv++] = *auth_line++;
                 }
             }
-            value[vv] = '\0';
         }
+        value[vv] = '\0';
 
         while (auth_line[0] != ',' && auth_line[0] != '\0') {
             auth_line++;



Mime
View raw message