Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f7411-0007G2-Bo for pgsql-bugs@arkaria.postgresql.org; Fri, 13 Apr 2018 19:05:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f7410-0008Qa-Cf for pgsql-bugs@arkaria.postgresql.org; Fri, 13 Apr 2018 19:05:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f7410-0008QR-3X for pgsql-bugs@lists.postgresql.org; Fri, 13 Apr 2018 19:05:42 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f740w-0008Ln-Ph for pgsql-bugs@lists.postgresql.org; Fri, 13 Apr 2018 19:05:41 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 4CC8A21C29C0; Fri, 13 Apr 2018 22:05:37 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from arthur.localdomain (ppp91-76-167-72.pppoe.mtu-net.ru [91.76.167.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 17C6321C29B6; Fri, 13 Apr 2018 22:05:37 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1523646337; bh=Kg8ozPAZ8VIsURnJARG/RXu9gP9PImjLoWguwBjE6ew=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=eyuVSmc5zxjpQdmZKZHuDplzIuW25wXz4Dlv+PthrJxqYgjBptt6TVMAwe1kl3LEE /MMgSBwn40NGJfxRsDRXuxR+uIzRHfW0SfOy08OJS2LYlhanc0yyrOCDShGR3XHVWM ECczpj1ZXSbPr1wpJgi1bIbOXVUcOdA8lweJF6wI= Date: Fri, 13 Apr 2018 22:05:30 +0300 From: Arthur Zakirov To: Tom Lane Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15150: Reading uninitialised value in NISortAffixes (tsearch/spell.c) Message-ID: <20180413190529.GA6210@arthur.localdomain> References: <152353327780.31225.13445405496721177988@wrigleys.postgresql.org> <20180412115638.GA19444@zakirov.localdomain> <23884.1523571243@sss.pgh.pa.us> <20180413113447.GA32474@zakirov.localdomain> <16385.1523641860@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16385.1523641860@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Apr 13, 2018 at 01:51:00PM -0400, Tom Lane wrote: > > I attached the patch. It fixes the following: > > - show an error if actual number of affix aliases is greater than > > initial number. I wonder is it necessary. But I think it is better to > > raise an error than crash, if you set wrong number for AF flag. > > Good idea, but I tweaked the message wording a bit. > > > The code coverage still isn't 100% for spell.c. But it is better than > > earlier. > > Indeed. Pushed, thanks! Thank you! -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company