Changeset 2011

Show
Ignore:
Timestamp:
10/27/2007 11:07:04 PM (9 months ago)
Author:
jan
Message:

fixed several crashes in log-request-handling with %s being NULL on
solaris

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/NEWS

    r2002 r2011  
    77  * fixed decoding of common headers in AJP13 (#1399) 
    88  * disable experimental linux-aio and posix-aio support, use gthread-aio instead 
     9  * fixed several crashes in log-request-handling with %s being NULL on solaris 
     10  * fixed network-backend-solaris-sendfilev (EINVAL in writev()) 
     11  * fixed initgroups() called after chroot (#1384) 
    912 
    1013- 1.5.0-r19.. -  
  • trunk/src/buffer.h

    r1952 r2011  
    133133 
    134134#define BUF_STR(x) x->ptr 
     135 
     136/* used on solaris as their vprintf() hates NULL for %s */ 
     137#define SAFE_BUF_STR(x) x && x->ptr ? x->ptr : "(null)"  
     138 
    135139#define BUFFER_APPEND_STRING_CONST(x, y) \ 
    136140        buffer_append_string_len(x, y, sizeof(y) - 1) 
  • trunk/src/http_req.c

    r1828 r2011  
    282282                        } 
    283283 
    284                         TRACE("parsing failed at token (%s [%d]), header: %s", BUF_STR(token), token_id, BUF_STR(hdr)); 
     284                        TRACE("parsing failed at token (%s [%d]), header: %s", SAFE_BUF_STR(token), token_id, SAFE_BUF_STR(hdr)); 
    285285 
    286286                        buffer_free(hdr); 
  • trunk/src/response.c

    r1949 r2011  
    225225                if (con->conf.log_request_handling) { 
    226226                        TRACE("-- %s", "splitting Request-URI"); 
    227                         TRACE("Request-URI  : %s", BUF_STR(con->request.uri)); 
    228                         TRACE("URI-scheme   : %s", BUF_STR(con->uri.scheme)); 
    229                         TRACE("URI-authority: %s", BUF_STR(con->uri.authority)); 
    230                         TRACE("URI-path     : %s", BUF_STR(con->uri.path_raw)); 
    231                         TRACE("URI-query    : %s", BUF_STR(con->uri.query)); 
     227                        TRACE("Request-URI  : %s", SAFE_BUF_STR(con->request.uri)); 
     228                        TRACE("URI-scheme   : %s", SAFE_BUF_STR(con->uri.scheme)); 
     229                        TRACE("URI-authority: %s", SAFE_BUF_STR(con->uri.authority)); 
     230                        TRACE("URI-path     : %s", SAFE_BUF_STR(con->uri.path_raw)); 
     231                        TRACE("URI-query    : %s", SAFE_BUF_STR(con->uri.query)); 
    232232                } 
    233233 
     
    403403                        TRACE("Doc-Root     : %s", BUF_STR(con->physical.doc_root)); 
    404404                        TRACE("Rel-Path     : %s", BUF_STR(con->physical.rel_path)); 
    405                         TRACE("Path         : %s", BUF_STR(con->physical.path)); 
     405                        TRACE("Path         : %s", SAFE_BUF_STR(con->physical.path)); 
    406406                } 
    407407                /* the docroot plugin should set the doc_root and might also set the physical.path