Return-Path: Delivered-To: apmail-httpd-apreq-cvs-archive@www.apache.org Received: (qmail 2209 invoked from network); 14 Mar 2005 18:48:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Mar 2005 18:48:13 -0000 Received: (qmail 27965 invoked by uid 500); 14 Mar 2005 18:48:13 -0000 Delivered-To: apmail-httpd-apreq-cvs-archive@httpd.apache.org Received: (qmail 27942 invoked by uid 500); 14 Mar 2005 18:48:13 -0000 Mailing-List: contact apreq-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: apreq-dev@httpd.apache.org List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-cvs@httpd.apache.org Received: (qmail 27928 invoked by uid 99); 14 Mar 2005 18:48:12 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 14 Mar 2005 10:48:12 -0800 Received: (qmail 2195 invoked by uid 65534); 14 Mar 2005 18:48:11 -0000 Message-ID: <20050314184811.2190.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Mon, 14 Mar 2005 18:48:10 -0000 Subject: svn commit: r157446 - httpd/apreq/branches/multi-env-unstable/module/apache2/handle.c To: apreq-cvs@httpd.apache.org From: joes@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: joes Date: Mon Mar 14 10:48:08 2005 New Revision: 157446 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D157446 Log: ctx->body is NULL when there's no body to parse, so we need to make sure that the body_status is APR_SUCCESS=20 to avoid a segfault. Bug reported by Marcus Wichitill. Modified: httpd/apreq/branches/multi-env-unstable/module/apache2/handle.c Modified: httpd/apreq/branches/multi-env-unstable/module/apache2/handle.c URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/= module/apache2/handle.c?view=3Ddiff&r1=3D157445&r2=3D157446 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- httpd/apreq/branches/multi-env-unstable/module/apache2/handle.c (origin= al) +++ httpd/apreq/branches/multi-env-unstable/module/apache2/handle.c Mon Mar= 14 10:48:08 2005 @@ -184,7 +184,7 @@ /* riff on Duff's device */ apreq_filter_read(f, APREQ_DEFAULT_READ_BLOCK_SIZE); =20 - default: + case APR_SUCCESS: =20 val =3D apr_table_get(ctx->body, name); if (val !=3D NULL) @@ -192,6 +192,15 @@ =20 } while (ctx->status =3D=3D APR_INCOMPLETE); =20 + break; + + default: + + if (ctx->body !=3D NULL) { + val =3D apr_table_get(ctx->body, name); + if (val !=3D NULL) + return apreq_value_to_param(val); + } } =20 return NULL;