Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pyvch-00084a-12 for pgsql-bugs@arkaria.postgresql.org; Tue, 16 May 2023 14:25:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pyvcf-0000Sz-TT for pgsql-bugs@arkaria.postgresql.org; Tue, 16 May 2023 14:25:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pyva0-0003A5-HQ for pgsql-bugs@lists.postgresql.org; Tue, 16 May 2023 14:23:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pyvZx-0009WJ-Be for pgsql-bugs@lists.postgresql.org; Tue, 16 May 2023 14:23:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 34GEN3mK2595016; Tue, 16 May 2023 10:23:03 -0400 From: Tom Lane To: exclusion@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17935: Incorrect memory access in fuzzystrmatch/difference() In-reply-to: <17935-b99316aa79c18513@postgresql.org> References: <17935-b99316aa79c18513@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 16 May 2023 13:00:00 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2595014.1684246983.1@sss.pgh.pa.us> Date: Tue, 16 May 2023 10:23:03 -0400 Message-ID: <2595015.1684246983@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > In this case, _soundex() exits prematurely and sets only first and last > char > of it's parameter outstr, but difference() loops through SOUNDEX_LEN > chars, > and thus uses initialized data. Yup, that's pretty sloppy, will fix. regards, tom lane