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 1kkIbK-00089m-SD for pgsql-committers@arkaria.postgresql.org; Wed, 02 Dec 2020 03:14:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kkIbJ-0004r9-PQ for pgsql-committers@arkaria.postgresql.org; Wed, 02 Dec 2020 03:14:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkIbJ-0004r1-Jo for pgsql-committers@lists.postgresql.org; Wed, 02 Dec 2020 03:14:41 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkIbH-0004sg-Ee for pgsql-committers@lists.postgresql.org; Wed, 02 Dec 2020 03:14:40 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D5CA5E92; Tue, 1 Dec 2020 22:14:37 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 01 Dec 2020 22:14:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=H25UYWgcef6Dv5OyMzDaar+nYyd TuymEr1cMk7hwgR0=; b=DOczS0SwvsidLg7vbjbzZ/wWCxkIFNzN37aH2imXyIC t/mGCulerp5FevPCzKQsCkdOtzGMBFolGfuof/WwUaq46IMSaSCBJvwHR2EtdwUC 8LRE6WmX5ntA86TRtvcACXVJqjQH4KbOJK0d4GJzX+enwd3Y3ZDY7KsEPqCHzVk7 5YI8n6pkmcwQd1rgCEXzt6tw+/96Z755bW9qGKRX/NnpNtBjzuIv6H3wDnYKy8Fo dx77SBcjt2FuiioSi4NzNrQ3kHEZfZDQ5b9GI2zgETi+JN6cLSXYLfXWlB3b3ogr eFxYyDF5VzUd0bgwJPqEbW/eZjQ2zHoH42hioi4dULA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=H25UYW gcef6Dv5OyMzDaar+nYydTuymEr1cMk7hwgR0=; b=mR9MhelzG0C7wm0cNYGKuJ xjvTcMe0+eEPlYJi2ATVSRPbvNFnpZCA7pdQra0wX1lWXuZn9xBuQG3Ho5Z3tRVl rNbsTGe1BO8spC4Scmh1w00Bk5ZikVA6YKJp3NLGGppiEWtTyWNZbByRH+wPbFGY z0XHzmI0+6JYzVYZgt7U26RRYpjclu3hoWZ/tv9H4fGqkZw0VC2pRE/SQFSPyL2I Aw4os1NfEugtVI7BvnyLXr8YKmcOPwJMwJWha9QGPrnhosZnV5U8XKhcrMmkAJ6Z oPjRi4o2wTbyfMzVxtzsv3Z0UKmwNnixul0rzcCP581+oB/CvP1QD6TxrDHApT0A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeifedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 00341108005E; Tue, 1 Dec 2020 22:14:35 -0500 (EST) Date: Wed, 2 Dec 2020 12:14:33 +0900 From: Michael Paquier To: Fujii Masao Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Move SHA2 routines to a new generic API layer for crypto hashes Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0o9cNOhl05IhyQjr" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0o9cNOhl05IhyQjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 02, 2020 at 11:42:58AM +0900, Fujii Masao wrote: > On 2020/12/02 10:41, Michael Paquier wrote: >> Move SHA2 routines to a new generic API layer for crypto hashes >=20 > Thanks for improving this! > I got the following compiler failure. ISTM that the variable "status" > in both pg_cryptohash_update() and pg_cryptohash_final() needs > to be initialized with 0. Patch attached. Thought? Neither gcc nor clang complain on my end, even with -Werror=3Dmaybe-uninitialized, because they understand that the status will be set anyway as we have no default in the switch? :) You are right, this is bad practice for those code paths, so let's fix it. Which version are you using? I'd like to be able to reproduce that and double-check if there are more missing spots. -- Michael --0o9cNOhl05IhyQjr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl/HBpkACgkQnvQgOdby QH06tg//UWjSN176625hXzGOrdp8FqTlGHJSXKJ9gfqGZjcnsIL490RjH/VfchN5 h5aEtu9NiRylCrC8QBjezLErAuQ/cNjxVP/9A7DajSK5JtXMXp/+CLTYvAg6klm6 dvowwPyLWnkAxa3Y6Yxrdh9K40usaJq6wJ1yRZajW/78CMQ25lzGpqYGM3I0hwIW f4+GKAIn37DB8NjSwPuDQv1dy5EhrpHd2/088T0Feu6uyaM7ADlr/Tml4sh9J3gD 2J2q1z5ifFdeBGBrfnMWjE42BOLvzDyYCAplnn7uByfq1TMoZxKzhfnutcUzuYC/ AkCZ8QgYHr8ucYwqppsCVJX1xX676E4bxhq3J6njUlQMXfi0piYkInOB/ANH4udz e0FvZIftb6+PcMG8fBNiUP3fYD8YgXup+sWjlVEfjXjDD5jgQe8EGuM3aJIY9VL0 wNQvVFiYPbKzkOJbGJmzB/9jJkvLV0I4VZAb9xaFJcGGHbsPhTHv8tYlBgX2x5Z+ yiHlasQeR2Caed+bwweFkkq45+uGiiJzROjlEz+Xga1OCs+1gTavCeB8UF9i7mfx 0I9yj5lbg4/9+YPMEAONba0XE4rhnaSdyCeuGZ56tDjRi2OHs3cZa9i+SxpjlEVG 5l3qKHBCW8LZhFRIla5krd0SkE+hqcjNVsLU4KPHcqmRx0fECyQ= =TINc -----END PGP SIGNATURE----- --0o9cNOhl05IhyQjr--