Avoid unnecessary use of strncpy in a couple of places in ecpg. Use of strncpy with a length limit based on the source, rather than the destination, is non-idiomatic and draws warnings from gcc 8. Replace with memcpy, which does exactly the same thing in these cases, but with less chance for confusion.
Backpatch to all supported branches. Discussion: https://postgr.es/m/[email protected] Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cd56194d189dd616ad432110af2d8bf8dd533845 Modified Files -------------- src/interfaces/ecpg/ecpglib/descriptor.c | 2 +- src/interfaces/ecpg/pgtypeslib/common.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-)
