[COMMITTERS] pgsql: Avoid use of non-portable strnlen() in pgstat_clip_activity(). - Mailing list pgsql-committers

From Andres Freund
Subject [COMMITTERS] pgsql: Avoid use of non-portable strnlen() in pgstat_clip_activity().
Date
Msg-id E1duQ3A-00031N-Pm@gemulon.postgresql.org
Whole thread Raw
Responses Re: [COMMITTERS] pgsql: Avoid use of non-portable strnlen() in pgstat_clip_activity().  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-committers
Avoid use of non-portable strnlen() in pgstat_clip_activity().

The use of strnlen rather than strlen was just paranoia. Instead of
giving up on the paranoia, just implement the safeguard
differently. And add a comment explaining why we're careful.

Author: Andres Freund
Discussion: https://postgr.es/m/E1duOkJ-0001Mc-U5@gemulon.postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/71edbb6f66f7139d6209334ef8734a122ba06b56

Modified Files
--------------
src/backend/postmaster/pgstat.c | 25 +++++++++++++++++++++----
src/include/pgstat.h            |  2 +-
2 files changed, 22 insertions(+), 5 deletions(-)


--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Speedup pgstat_report_activity by moving mb-aware truncation to
Next
From: pgsql@postgresql.org
Date:
Subject: [COMMITTERS] pgsql: Tag refs/tags/REL_10_RC1 was created