aboutsummaryrefslogtreecommitdiff
path: root/contrib/pg_trgm/trgm_regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pg_trgm/trgm_regexp.c')
-rw-r--r--contrib/pg_trgm/trgm_regexp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c
index 529e1dbfe97..a91e6186bae 100644
--- a/contrib/pg_trgm/trgm_regexp.c
+++ b/contrib/pg_trgm/trgm_regexp.c
@@ -877,7 +877,7 @@ convertPgWchar(pg_wchar c, trgm_mb_char *result)
#endif
/* Fill result with exactly MAX_MULTIBYTE_CHAR_LEN bytes */
- strncpy(result->bytes, s, MAX_MULTIBYTE_CHAR_LEN);
+ memcpy(result->bytes, s, MAX_MULTIBYTE_CHAR_LEN);
return true;
}