summaryrefslogtreecommitdiff
path: root/storage/connect/tabxml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/tabxml.cpp')
-rw-r--r--storage/connect/tabxml.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp
index 489fcae303b..062d52679f6 100644
--- a/storage/connect/tabxml.cpp
+++ b/storage/connect/tabxml.cpp
@@ -241,7 +241,9 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
more:
if (vp->atp) {
- strncpy(colname, vp->atp->GetName(g), sizeof(colname));
+ size_t z = sizeof(colname) - 1;
+ strncpy(colname, vp->atp->GetName(g), z);
+ colname[z] = 0;
strncat(xcol->Name, colname, XLEN(xcol->Name));
switch (vp->atp->GetText(g, buf, sizeof(buf))) {