Re: BUG #15312: Possible access to unintended variable in "postgres/src/backend/postmaster/pgstat.c" line 2698

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: petrum(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15312: Possible access to unintended variable in "postgres/src/backend/postmaster/pgstat.c" line 2698
Date: 2018-08-07 18:45:22
Message-ID: 28213.1533667522@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?utf-8?q?PG_Bug_reporting_form?= <noreply(at)postgresql(dot)org> writes:
> MemSet(BackendActivityBuffer, 0, size); //HERE

> Shouldn't BackendActivityBufferSize be accessed in the marked line instead
> of size?

Yeah, I think you're right --- looks like a pretty obvious copy-and-paste
oversight. It's probably harmless as long as
pgstat_track_activity_query_size is at least NAMEDATALEN, but it's
not good.

Thanks for reporting that!

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-08-07 19:00:00 BUG #15315: Trigger on foreign data wrapper (MYSQL) does not update columns not in set clause
Previous Message Tom Lane 2018-08-07 18:40:13 Re: BUG #15310: pg_upgrade dissociates event triggers from extensions