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
[ 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
{
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)
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;
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 */