Fix Connect compile issue

This commit is contained in:
Andrew Hutchings 2023-05-13 17:09:57 +01:00 committed by Andrew Hutchings
parent 2ff01e763e
commit 8810b1ecf1
2 changed files with 3 additions and 3 deletions

View file

@ -167,7 +167,7 @@ bool JAVAConn::gmID(PGLOBAL g, jmethodID& mid, const char *name, const char *sig
mid = env->GetMethodID(jdi, name, sig);
if (Check()) {
snprintf(g->Message, sizeof(g->Message), Msg);
snprintf(g->Message, sizeof(g->Message), "%s", Msg);
return true;
} else
return false;

View file

@ -113,7 +113,7 @@ bool JMGDISC::ColDesc(PGLOBAL g, jobject obj, char *pcn, char *pfmt,
z = 65 - strlen(colname);
strncat(strncat(colname, "_", z), key, z - 1);
} else
snprintf(colname, sizeof(colname), key);
snprintf(colname, sizeof(colname), "%s", key);
if (pfmt) {
strncpy(fmt, pfmt, 128);
@ -121,7 +121,7 @@ bool JMGDISC::ColDesc(PGLOBAL g, jobject obj, char *pcn, char *pfmt,
z = 129 - strlen(fmt);
strncat(strncat(fmt, ".", z), key, z - 1);
} else
snprintf(fmt, sizeof(fmt), key);
snprintf(fmt, sizeof(fmt), "%s", key);
if (!jres) {
bcol.Type = n[0];