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 1wyr5L-003fdM-01 for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Aug 2026 13:21: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 1wyr5J-0085Q8-38 for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Aug 2026 13:21: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 1wyr5J-0085Q0-2D for pgsql-hackers@lists.postgresql.org; Tue, 25 Aug 2026 13:21: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 1wyr5H-00000002Ljq-2yiG for pgsql-hackers@postgresql.org; Tue, 25 Aug 2026 13:21: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 67PDKqbG618199; Tue, 25 Aug 2026 09:20:52 -0400 From: Tom Lane To: Sehrope Sarkuni cc: Daniel Gustafsson , Peter Eisentraut , PostgreSQL Hackers Subject: Re: Replace px_memset() with explicit_bzero() In-reply-to: References: Comments: In-reply-to Sehrope Sarkuni message dated "Tue, 25 Aug 2026 08:27:54 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <618197.1787664052.1@sss.pgh.pa.us> Date: Tue, 25 Aug 2026 09:20:52 -0400 Message-ID: <618198.1787664052@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sehrope Sarkuni writes: > One thing stood out, but it's from the existing code: > - px_memset(&sha_buf_tmp, 0, sizeof sha_buf); > + explicit_bzero(&sha_buf_tmp, sizeof sha_buf); > That's sha_buf in the sizeof but we're zeroing out sha_buf_tmp. +1 for fixing that. Also I think project style is to write sizeof with parens. regards, tom lane