Avoid use of non-portable strnlen() in pgstat_clip_activity().
Andres Freund <andres@anarazel.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/postmaster/pgstat.c | modified | +21 −4 |
| src/include/pgstat.h | modified | +1 −1 |
Discussion
Cited messages not in the archive:
E1duOkJ-0001Mc-U5@gemulon.postgresql.org