From: Jim Jagielski Date: Mon, 7 Dec 2015 12:29:46 +0000 (+0000) Subject: Merge r1716940, r1717086 from trunk: X-Git-Tag: 2.4.18~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56d52bb97c094ec709360ecbf0ce854d8dfa03cb;p=thirdparty%2Fapache%2Fhttpd.git Merge r1716940, r1717086 from trunk: Use 'ap_pbase64decode' to simplify code. Silent a sparse Warning. cid->ecb->lpszLogData can not be NULL. It is defined in mod_isapi.h as: typedef struct EXTENSION_CONTROL_BLOCK { ... char lpszLogData[80]; ... Submitted by: jailletc36 Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1718332 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 3b2bea8bfc1..965543d0fa5 100644 --- a/STATUS +++ b/STATUS @@ -112,14 +112,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) Easy patches: synch 2.4.x and trunk - - mod_auth_basic: Use 'ap_pbase64decode' to simplify code. - - mod_isapi: Silent a sparse Warning. - trunk patch: http://svn.apache.org/r1716940 - http://svn.apache.org/r1717086 - 2.4.x patch: trunk patches work - +1: jailletc36, ylavic, jim - *) mod_ssl: Save a few bytes in conf pool. trunk patch: http://svn.apache.org/r1715273 2.4.x patch: trunk patches work diff --git a/modules/aaa/mod_auth_basic.c b/modules/aaa/mod_auth_basic.c index dc03b438972..1d72ff681dd 100644 --- a/modules/aaa/mod_auth_basic.c +++ b/modules/aaa/mod_auth_basic.c @@ -254,7 +254,6 @@ static int get_basic_auth(request_rec *r, const char **user, { const char *auth_line; char *decoded_line; - int length; /* Get the appropriate header */ auth_line = apr_table_get(r->headers_in, (PROXYREQ_PROXY == r->proxyreq) @@ -279,10 +278,7 @@ static int get_basic_auth(request_rec *r, const char **user, auth_line++; } - decoded_line = apr_palloc(r->pool, apr_base64_decode_len(auth_line) + 1); - length = apr_base64_decode(decoded_line, auth_line); - /* Null-terminate the string. */ - decoded_line[length] = '\0'; + decoded_line = ap_pbase64decode(r->pool, auth_line); *user = ap_getword_nulls(r->pool, (const char**)&decoded_line, ':'); *pw = decoded_line; diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c index ec0d35e74f5..66cc8da69ed 100644 --- a/modules/arch/win32/mod_isapi.c +++ b/modules/arch/win32/mod_isapi.c @@ -1582,9 +1582,10 @@ static apr_status_t isapi_handler (request_rec *r) rv = (*isa->HttpExtensionProc)(cid->ecb); /* Check for a log message - and log it */ - if (cid->ecb->lpszLogData && *cid->ecb->lpszLogData) + if (*cid->ecb->lpszLogData) { ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02113) "%s: %s", r->filename, cid->ecb->lpszLogData); + } switch(rv) { case 0: /* Strange, but MS isapi accepts this as success */