diff options
Diffstat (limited to 'src/bin/scripts/common.c')
-rw-r--r-- | src/bin/scripts/common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c index 680bbb133a3..965572897f9 100644 --- a/src/bin/scripts/common.c +++ b/src/bin/scripts/common.c @@ -353,8 +353,7 @@ splitTableColumnsSpec(const char *spec, int encoding, else cp += PQmblen(cp, encoding); } - *table = pg_strdup(spec); - (*table)[cp - spec] = '\0'; /* no strndup */ + *table = pnstrdup(spec, cp - spec); *columns = cp; } |