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.96) (envelope-from ) id 1x0TCR-004ecR-0W for pgsql-bugs@arkaria.postgresql.org; Sun, 30 Aug 2026 00:15:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x0TCP-00CSDS-32 for pgsql-bugs@arkaria.postgresql.org; Sun, 30 Aug 2026 00:15:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x0TCP-00CSD9-2A for pgsql-bugs@lists.postgresql.org; Sun, 30 Aug 2026 00:15:01 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x0TCO-000000034ow-0Pbo for pgsql-bugs@lists.postgresql.org; Sun, 30 Aug 2026 00:15:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 67U0EvsZ431729; Sat, 29 Aug 2026 20:14:57 -0400 From: Tom Lane To: Ewan Young cc: Alexander Lakhin , Andrey Rachitskiy , michaelmalis2@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19595: Three memory-safety defects in src/backend/tsearch/spell.c (dictionary loader), PG 18.3 In-reply-to: References: <19595-7dc18b4e212c4757@postgresql.org> <325748.1785691547@sss.pgh.pa.us> <0f3ddeb5-0dbd-479c-9d0e-ae254758e624@gmail.com> <336527.1785701494@sss.pgh.pa.us> Comments: In-reply-to Ewan Young message dated "Mon, 24 Aug 2026 19:20:42 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <431727.1788048897.1@sss.pgh.pa.us> Date: Sat, 29 Aug 2026 20:14:57 -0400 Message-ID: <431728.1788048897@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ewan Young writes: > One more problem in the same file. It is not one of the three in the > original report - those were all on the affix-rule side (CompoundAffix, > the flag buffer, the AF alias table), while this one is in the compound > flag table - and it is older than all of them, the code being from 9.6. > So I'm posting here rather than opening a new report. Pushed, thanks for the report! I noticed while reading your patch that all of the strtol() calls in this file store the result into an "int" not a "long", which opens the door to an undetected integer overflow and truncation. Nothing terribly harmful seems likely to ensue, but I thought I'd clean that up too while we're here. regards, tom lane