Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uZIw7-001UKS-8l for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Jul 2025 00:45:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uZIw4-00Cf15-F2 for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Jul 2025 00:45:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uZIw4-00Cf0t-63 for pgsql-bugs@lists.postgresql.org; Wed, 09 Jul 2025 00:45:20 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uZIw2-006YJx-2D for pgsql-bugs@lists.postgresql.org; Wed, 09 Jul 2025 00:45:20 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 165FEEC0D6F; Tue, 8 Jul 2025 20:45:17 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Tue, 08 Jul 2025 20:45:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1752021917; x=1752108317; bh=vCY0tPAb2o 18Zriw/Sg/ItziM0E6gFK7Dt1sSxe4K2Y=; b=LgGu4VUrJv4y4XAlkxxlLz10VN UKaRBxa88bv4/QMkJ4Jts+i5rEgNLCOYTwZzGVSKehPM0k0Jucn6sYdDNM+p8OnN nLrAtZ408RCVPH7p1AeeX8v5bDMGLMnuhcOp2RBtp5on3tKbWvVA6VPEHJ+A20rv 2Wlnxs2LiryO39mKPxCUC4wgG3KEMytpQFueU8PEf3p8POUPJrw4fBPpUVde6LoD SEgdzEQDnUlESJty0u+9zsSPdLoZu9tjnYVIeON/XSXUb1ri/cT3dwIVMyZViY4k PY9Wd8dEUM/gzqWAeJxS4FHdgbDyiGDN5vDZK1GMXB/XVHVKeJWsdAcJnlCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1752021917; x=1752108317; bh=vCY0tPAb2o18Zriw/Sg/ItziM0E6gFK7Dt1 sSxe4K2Y=; b=blhyTYNvy4zhToyDitOMk9fBMi4upSEZprU/FXsqkEOriqGajWE 3MAV98zscze2Eydqs3BW2OrduCvT74Z882MczP9dvSLm2UTvN1wQ5PWjHVgKs5va Th65BQQytQwpTxqXjdYs151GKTeeBG9jPY0p+GXL7pkAWwLKyLDi5/Q8c5sbDy63 FFDRwxSlR9EjlNIjXZDW6wl4Y5Y1FW/GoU99I2Y1FEAWJpkvCMQpsA3fXax568Hv 8U56eFM1EvOeIwb9FWTtG2AD9XfcQZ2YrrMu+06nQWetLrdZMasAfgXzrM0gm/am +dvDIgswuaqHcN3CxtLYo+yGUHnNOM6iQ8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdefieduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeff hfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehtghhlse hsshhsrdhpghhhrdhprgdruhhspdhrtghpthhtohephhgrsggvrhhkohhrnhessgduqdhs hihsthgvmhhsrdguvgdprhgtphhtthhopehjihhmrdhjohhnvghssehunhhiqdhmuhgvnh hsthgvrhdruggvpdhrtghpthhtohepphhgshhqlhdqsghughhssehlihhsthhsrdhpohhs thhgrhgvshhqlhdrohhrghdprhgtphhtthhopehmrghrrghlihhsthekieesmhgrihhlrd hruh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Jul 2025 20:45:14 -0400 (EDT) Date: Wed, 9 Jul 2025 09:45:07 +0900 From: Michael Paquier To: Tom Lane Cc: Robin Haberkorn , Jim Jones , pgsql-bugs@lists.postgresql.org, maralist86@mail.ru Subject: Re: BUG #18943: Return value of a function 'xmlBufferCreate' is dereferenced at xpath.c:177 without checking for NUL Message-ID: References: <31f3480e-cd7d-4021-b392-87922572cc37@uni-muenster.de> <689495.1751981797@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rFIo562mU2y5woc8" Content-Disposition: inline In-Reply-To: <689495.1751981797@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --rFIo562mU2y5woc8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 08, 2025 at 09:36:37AM -0400, Tom Lane wrote: > The comment in xml_errorHandler() argues Yep. > So switching to _ALL (or even _WELL_FORMED) mode would result in > nontrivial differences in the behavior of xpath.c's functions with > bad input. Maybe that's a reasonable thing to do, but it's a > question of user-visible behavior not just code cleanliness. Yes, I don't see a huge advantage in doing the switch for this module. If the gain in information in the error states grabbed from libxml2 makes it a win, that may be a different argument (I am fine to be proved wrong), but I cannot get excited about that without more data to claim it so. I have quickly tested the change, and the xpath_string() path was one area that immediately stood out, and we may report an incorrect error. -- Michael --rFIo562mU2y5woc8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmhtu5MACgkQnvQgOdby QH2RKw/9Hy92RCnG0Kp5e9lM1HTrJqYUYyhw8LJzwt+zL/GJoGKQlCrr6ZCcdMML tRpGAIRwb1B9qiYwguG/BGXEcHn4IlEbTCmg9bD3P7qpmYn/lvIMcYyFxoIl4E0U lO1B3vPrZ6DpJAnOlaCY4x8qvFIyoHMeq588U0uDVUhnW/foNfCtfk2RaB45i8EZ tfWU1MVHwv5QGFm15xtaM9yzMt2LiS3HR6oMIEftTkss8H64lcXck10cz8O4Iq7t sD6EqdH/X5i+Kx37Nk5Apr4I4DIjKnvgi/3uuwU6eLs4bD5UVRvcx8fuPfUNqMA2 NdSufsrmLd73E8eDvtVfyC/3MvrzyXLIAxlJpA/cTRZw7AkAt6ufyVTUb6okFY1K 0UJuRainF7yGq4PGR+vXI3geCgbOCsunFdiGV2jJj0u5UlLLD1wLHwZ+FyCxBHDc p4Uwu9mil/y3NvNQRFWXYtLii5sHpIo7NDckxJzD6YDdkgAEna3bKQvd+m0pXin1 G4032TP9orzhA67V4TexNmbsulBUqY7tCC4flrglAefQBpYhzXX4l8HFZ1H0Sqa3 ZmQ12kgMsBnNS2C6rTqad8CZ0RIbMPSIAPhEvCm9TmBh/IijU8MpWlKu5i3LXAW4 Nt2XQMP73SQGX28slxjDcRppBPDXAkbIy9PtDfd1rY4RpSiqW20= =7K0I -----END PGP SIGNATURE----- --rFIo562mU2y5woc8--