[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#251800: marked as done ([PATCH] apr_table_overlap doesn't work as advertised)



Your message dated Sat, 22 Oct 2005 22:02:08 -0700
with message-id <E1ETXzk-0001W9-00@spohr.debian.org>
and subject line Bug#251800: fixed in apache2 2.0.55-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 31 May 2004 00:06:29 +0000
>From dlitz@dlitz.net Sun May 30 17:06:29 2004
Return-path: <dlitz@dlitz.net>
Received: from bernstein.dlitz.net [65.19.178.107] 
	by spohr.debian.org with smtp (Exim 3.35 1 (Debian))
	id 1BUaJx-0003Sk-00; Sun, 30 May 2004 17:06:29 -0700
Received: (qmail 2970 invoked from network); 31 May 2004 00:06:28 -0000
Received: from unknown (HELO rivest.dlitz.net) (24.72.34.179)
  by bernstein.dlitz.net with SMTP; 31 May 2004 00:06:28 -0000
Received: (qmail 22075 invoked by uid 1000); 31 May 2004 00:10:11 -0000
Date: Sun, 30 May 2004 18:10:11 -0600
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Cc: dev@apr.apache.org
Subject: [PATCH] apr_table_overlap doesn't work as advertised
Message-ID: <20040531001011.GA21911@rivest.dlitz.net>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw"
Content-Disposition: inline
X-Reportbug-Version: 2.54
X-Homepage: http://www.dlitz.net/
X-PGP-Public-Key-URL: http://www.dlitz.net/go/gpgkey
X-PGP-ID: 0xE272C3C3
X-PGP-Fingerprint: 9413 0BD2 1030 070E 301E  594F F998 B6D8 E272 C3C3
X-Operating-System: Debian testing/unstable GNU/Linux rivest.dlitz.net 2.4.26-1um
User-Agent: Mutt/1.5.4i
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 


--GvXjxJ+pjyke8COw
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: libapr0
Version: 2.0.49-1
Severity: normal
Tags: patch

The function prototype for apr_table_overlap is as follows:

	void apr_table_overlap (apr_table_t *dest, const apr_table_t *src,
				unsigned flags);
  =09
According to to the documentation [1], apr_table_overlap is supposed to=20
merge the key-value pairs from src and dest into dest.

However, if src and dest are not allocated from the same resource pool, a=
=20
new buffer is allocated for dest, but this buffer is (erroneously) not=20
populated with the data from dest.  The result is that the newly-created=20
table contains only the data from src, rather than the merged data from=20
both src and dest.

I found the problem when trying to set per-directory PythonOption=20
directives (both Directory config and .htaccess files) for mod_python. =20

The patch below fixes the problem.  On Debian, it can be placed in the=20
debian/patches directory of the apache2 source package until upstream fixes=
=20
the problem (I've Cc'd dev@apr.apache.org).

[1] Apache Portable Runtime documentation, "Table and Array Functions"
	http://apr.apache.org/docs/apr/group__apr__tables.html#a31


=3D=3D BEGIN PATCH =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
--- ../apache2-2.0.49/build-tree/apache2/srclib/apr/tables/apr_tables.c	200=
4-02-13 03:33:52.000000000 -0600
+++ build-tree/apache2/srclib/apr/tables/apr_tables.c	2004-05-30 01:53:07.0=
00000000 -0600
@@ -1197,7 +1197,12 @@
=20
     /* copy (extend) a using b's pool */
     if (a->a.pool !=3D p) {
-        make_array_core(&a->a, p, m+n, sizeof(apr_table_entry_t), 0);
+        apr_array_header_t *array_tmp =3D (apr_array_header_t *)
+            apr_palloc(p, sizeof(apr_array_header_t));
+        make_array_core(array_tmp, p, m + n, sizeof(apr_table_entry_t), 0);
+        apr_array_cat(array_tmp, &a->a);
+        apr_table_clear(a);
+        memcpy(&a->a, array_tmp, sizeof(apr_array_header_t));
     }
=20
     apr_table_cat(a, b);
=3D=3D END PATCH =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

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.26-1um
Locale: LANG=3Den_CA.UTF-8, LC_CTYPE=3Den_CA.UTF-8

Versions of packages libapr0 depends on:
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared librarie=
s an
ii  libdb4.2                    4.2.52-11    Berkeley v4.2 Database Librari=
es [
ii  libexpat1                   1.95.6-8     XML parsing C library - runtim=
e li
ii  libpcre3                    4.3-3        Philip Hazel's Perl 5 Compatib=
le R

-- no debconf information

--=20
Dwayne C. Litzenberger <dlitz@dlitz.net>

This message contains an OpenPGP/MIME signature, which can be used to verif=
y=20
its authenticity.  If the message itself appears as an attachment, you are=
=20
probably using using a broken mail program, such as Microsoft Outlook Expre=
ss.

--GvXjxJ+pjyke8COw
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iEYEARECAAYFAkC6d+MACgkQ+Zi22OJyw8N8+gCgzKfMpxSuC1AtzdS1L4eVjx2k
GnsAoK0IkvVtXgPDQl0XSksjY5PRuzYh
=JyYy
-----END PGP SIGNATURE-----

--GvXjxJ+pjyke8COw--

---------------------------------------
Received: (at 251800-close) by bugs.debian.org; 23 Oct 2005 05:08:19 +0000
>From katie@spohr.debian.org Sat Oct 22 22:08:19 2005
Return-path: <katie@spohr.debian.org>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
	id 1ETXzk-0001W9-00; Sat, 22 Oct 2005 22:02:08 -0700
From: Adam Conrad <adconrad@0c3.net>
To: 251800-close@bugs.debian.org
X-Katie: $Revision: 1.56 $
Subject: Bug#251800: fixed in apache2 2.0.55-2
Message-Id: <E1ETXzk-0001W9-00@spohr.debian.org>
Sender: Archive Administrator <katie@spohr.debian.org>
Date: Sat, 22 Oct 2005 22:02:08 -0700
Delivered-To: 251800-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Source: apache2
Source-Version: 2.0.55-2

We believe that the bug you reported is fixed in the latest version of
apache2, which is due to be installed in the Debian FTP archive:

apache2-common_2.0.55-2_i386.deb
  to pool/main/a/apache2/apache2-common_2.0.55-2_i386.deb
apache2-doc_2.0.55-2_all.deb
  to pool/main/a/apache2/apache2-doc_2.0.55-2_all.deb
apache2-mpm-perchild_2.0.55-2_i386.deb
  to pool/main/a/apache2/apache2-mpm-perchild_2.0.55-2_i386.deb
apache2-mpm-prefork_2.0.55-2_i386.deb
  to pool/main/a/apache2/apache2-mpm-prefork_2.0.55-2_i386.deb
apache2-mpm-worker_2.0.55-2_i386.deb
  to pool/main/a/apache2/apache2-mpm-worker_2.0.55-2_i386.deb
apache2-prefork-dev_2.0.55-2_i386.deb
  to pool/main/a/apache2/apache2-prefork-dev_2.0.55-2_i386.deb
apache2-threaded-dev_2.0.55-2_i386.deb
  to pool/main/a/apache2/apache2-threaded-dev_2.0.55-2_i386.deb
apache2-utils_2.0.55-2_i386.deb
  to pool/main/a/apache2/apache2-utils_2.0.55-2_i386.deb
apache2_2.0.55-2.diff.gz
  to pool/main/a/apache2/apache2_2.0.55-2.diff.gz
apache2_2.0.55-2.dsc
  to pool/main/a/apache2/apache2_2.0.55-2.dsc
apache2_2.0.55-2_i386.deb
  to pool/main/a/apache2/apache2_2.0.55-2_i386.deb
libapr0-dev_2.0.55-2_i386.deb
  to pool/main/a/apache2/libapr0-dev_2.0.55-2_i386.deb
libapr0_2.0.55-2_i386.deb
  to pool/main/a/apache2/libapr0_2.0.55-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 251800@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Adam Conrad <adconrad@0c3.net> (supplier of updated apache2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 23 Oct 2005 13:24:39 +1000
Source: apache2
Binary: apache2-utils apache2 apache2-prefork-dev apache2-mpm-prefork apache2-doc libapr0-dev apache2-mpm-worker libapr0 apache2-threaded-dev apache2-common apache2-mpm-perchild
Architecture: source i386 all
Version: 2.0.55-2
Distribution: unstable
Urgency: low
Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org>
Changed-By: Adam Conrad <adconrad@0c3.net>
Description: 
 apache2    - next generation, scalable, extendable web server
 apache2-common - next generation, scalable, extendable web server
 apache2-doc - documentation for apache2
 apache2-mpm-perchild - experimental high speed perchild threaded model for Apache2
 apache2-mpm-prefork - traditional model for Apache2
 apache2-mpm-worker - high speed threaded model for Apache2
 apache2-prefork-dev - development headers for apache2
 apache2-threaded-dev - development headers for apache2
 apache2-utils - utility programs for webservers
 libapr0    - the Apache Portable Runtime
 libapr0-dev - development headers for libapr
Closes: 251800 307665 311317 316477 332619
Changes: 
 apache2 (2.0.55-2) unstable; urgency=low
 .
   * Mess with 010_more_fhs_compliancy to nail down the compiled default for
     cgisock to match with the default shipped in the config file, so people
     don't get confused if they miss including cgid.conf (closes: #316477)
   * Make the compiled-in PidFile match the config file for similar reasons.
   * Add 049_apr_tables_HEAD_cleanup, resolving an issue where merging two
     tables from different resource pools would leave you with the contents
     of only one, rather than both.  This patch also cleans up some broken
     pointer arithmetic and type casting along the way (closes: #251800)
   * Specify the DocumentRoot without a trailing slash (closes: #311317)
   * Fix the manpage to point at proper locations (closes: #307665, #332619)
Files: 
 69b0f1c4583e87143767e82f4d8bfe22 1130 net optional apache2_2.0.55-2.dsc
 d69638022606c6337060a89fa516b6e6 114213 net optional apache2_2.0.55-2.diff.gz
 71a5d5c40a6dc481227fb1ce98b311f5 2123090 doc optional apache2-doc_2.0.55-2_all.deb
 c3d04aaaafb6bc47c861c2b18359a739 788422 net optional apache2-common_2.0.55-2_i386.deb
 f621b08bb469579fb8a5109e8c0efa35 90960 net optional apache2-utils_2.0.55-2_i386.deb
 2fd7dfa2d891add00cd0f2a16d1be3a3 204668 net optional apache2-mpm-worker_2.0.55-2_i386.deb
 347a0c3cdf78d12b1991108eb230e588 205034 net optional apache2-mpm-perchild_2.0.55-2_i386.deb
 c5bcf6c41d786291cc67e5ec428bcf5e 201096 net optional apache2-mpm-prefork_2.0.55-2_i386.deb
 933bcf96b311106d9d4b94809e4738eb 169832 devel optional apache2-prefork-dev_2.0.55-2_i386.deb
 2308a0a805f73bd3b1a9a836bb05f36a 170622 devel optional apache2-threaded-dev_2.0.55-2_i386.deb
 4dd3cb5ffd9a6c4eb28c6338910ce4b4 131488 net optional libapr0_2.0.55-2_i386.deb
 c1e31dcc5934496b01826c321c30f84e 263164 libdevel optional libapr0-dev_2.0.55-2_i386.deb
 df40147cc4e52d45cad8e0bbad6fffd4 34664 web optional apache2_2.0.55-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDWxTBvjztR8bOoMkRAvcNAJ9PKDzx9kIDoYfdE7t/QE9hlXKWwgCcDjfa
Ym+4nxEd5sfgST7OVc8uSlE=
=B3Hz
-----END PGP SIGNATURE-----



Reply to: