From: William A. Rowe Jr Date: Thu, 6 Jul 2017 03:30:41 +0000 (+0000) Subject: Correct string scope to prevent duplicated values for subsequent tokens. X-Git-Tag: 2.2.34~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d60f5b728b75e965b37d43acb6744ee217f58831;p=thirdparty%2Fapache%2Fhttpd.git Correct string scope to prevent duplicated values for subsequent tokens. Submitted by: wrowe Backports: r1800919 Reviewed by: wrowe, jchampion, ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1800962 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 24396ffee90..be0ae30c1e2 100644 --- a/STATUS +++ b/STATUS @@ -110,11 +110,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: trunk patch: http://svn.apache.org/r1800917 +1: wrowe, jchampion (inspection), ylavic - *) Correct string scope to prevent duplicated values for subsequent tokens. - Submitted by: wrowe - trunk patch: http://svn.apache.org/r1800919 - +1: wrowe, jchampion, ylavic - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 4d088c3d70e..cb409f125eb 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -894,13 +894,13 @@ static int get_digest_rec(request_rec *r, digest_header_rec *resp) /* 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') { @@ -919,8 +919,8 @@ static int get_digest_rec(request_rec *r, digest_header_rec *resp) value[vv++] = *auth_line++; } } - value[vv] = '\0'; } + value[vv] = '\0'; while (auth_line[0] != ',' && auth_line[0] != '\0') { auth_line++;