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

From Tom Lane
Subject Re: BUG #15312: Possible access to unintended variable in "postgres/src/backend/postmaster/pgstat.c" line 2698
Date
Msg-id 28213.1533667522@sss.pgh.pa.us
Whole thread Raw
In response to BUG #15312: Possible access to unintended variable in"postgres/src/backend/postmaster/pgstat.c" line 2698  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.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


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15310: pg_upgrade dissociates event triggers from extensions
Next
From: PG Bug reporting form
Date:
Subject: BUG #15315: Trigger on foreign data wrapper (MYSQL) does not updatecolumns not in set clause