"Fossies" - the Fresh Open Source Software Archive

Member "mod_fastcgi-2.4.7-0910052141/debian/patches/apache2-segv-on-load.dpatch" (10 Apr 2012, 1033 Bytes) of package /linux/www/apache_httpd_modules/old/mod_fastcgi-2.4.7-0910052141.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #! /bin/sh /usr/share/dpatch/dpatch-run
    2 ## apache2-segv-on-load.dpatch by  <sugi@nemui.org>
    3 ##
    4 ## All lines beginning with `## DP:' are a description of the patch.
    5 ## DP: See the URL for details.
    6 ## DP: http://www.fastcgi.com/archives/fastcgi-developers/2005-April/003673.html
    7 
    8 @DPATCH@
    9 diff -urNad libapache-mod-fastcgi~/mod_fastcgi.c libapache-mod-fastcgi/mod_fastcgi.c
   10 --- libapache-mod-fastcgi~/mod_fastcgi.c    2005-08-06 14:09:11.000000000 +0900
   11 +++ libapache-mod-fastcgi/mod_fastcgi.c 2006-10-06 20:52:46.368480801 +0900
   12 @@ -2850,10 +2850,15 @@
   13  
   14      get_request_identity(r, &uid, &gid);
   15  
   16 -    if (fcgi_util_fs_get_by_id(r->filename, uid, gid))
   17 +    /* Only try this if r->filename is not NULL,
   18 +     * otherwise Apache 2 crashes with SIGSEGV... */
   19 +    if (r->filename)
   20      {
   21 -        r->handler = FASTCGI_HANDLER_NAME;
   22 -        return OK;
   23 +        if (fcgi_util_fs_get_by_id(r->filename, uid, gid))
   24 +        {
   25 +            r->handler = FASTCGI_HANDLER_NAME;
   26 +            return OK;
   27 +        }
   28      }
   29  
   30      return DECLINED;