Re: Replace px_memset() with explicit_bzero()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Replace px_memset() with explicit_bzero()
Date: 2026-08-25 13:20:52
Message-ID: 618198.1787664052@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sehrope Sarkuni <sehrope(at)jackdb(dot)com> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-08-25 13:41:27 Re: Assertion failure in GetSubscriptionRelations() with concurrent DROP TABLE
Previous Message Tom Lane 2026-08-25 13:19:08 Re: Add a Nix flake