Commit f72c6a1d authored by Jeff Trawick's avatar Jeff Trawick
Browse files

mod_cgid: Fix buffer overflow processing ScriptSock directive.

Submitted by:        Steve Kemp <steve steve.org.uk>
Reviewed/tweaked by: trawick



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@192995 13f79535-47bb-0310-9956-ffa450edef68
parent a5451462
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
Changes with Apache 2.1.6
  [Remove entries to the current 2.0 section below, when backported]
  *) mod_cgid: Fix buffer overflow processing ScriptSock directive.
     [Steve Kemp <steve steve.org.uk>]
Changes with Apache 2.1.5
  *) SECURITY: 
+2 −2
Changes for modules/generators/mod_cgid.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -597,7 +597,7 @@ static int cgid_server(void *data)

    memset(&unix_addr, 0, sizeof(unix_addr));
    unix_addr.sun_family = AF_UNIX;
    strcpy(unix_addr.sun_path, sockname);
    apr_cpystrn(unix_addr.sun_path, sockname, sizeof unix_addr.sun_path);

    omask = umask(0077); /* so that only Apache can use socket */
    rc = bind(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr));
@@ -1112,7 +1112,7 @@ static int connect_to_daemon(int *sdptr, request_rec *r,

    memset(&unix_addr, 0, sizeof(unix_addr));
    unix_addr.sun_family = AF_UNIX;
    strcpy(unix_addr.sun_path, sockname);
    apr_cpystrn(unix_addr.sun_path, sockname, sizeof unix_addr.sun_path);

    connect_tries = 0;
    sliding_timer = 100000; /* 100 milliseconds */