Avoid use of non-portable strnlen() in pgstat_clip_activity().
authorAndres Freund <andres@anarazel.de>
Tue, 19 Sep 2017 21:17:20 +0000 (14:17 -0700)
committerAndres Freund <andres@anarazel.de>
Tue, 19 Sep 2017 21:25:47 +0000 (14:25 -0700)
commit71edbb6f66f7139d6209334ef8734a122ba06b56
tree7a8644d2b6a04c67fdf92ae3f31c8b31b7968bbf
parent54b6cd589ac2f5635a42511236a5eb7299e2dcaf
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
src/backend/postmaster/pgstat.c
src/include/pgstat.h