We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 897a895 commit 27ed8acCopy full SHA for 27ed8ac
src/interfaces/odbc/connection.c
@@ -1403,7 +1403,7 @@ CC_lookup_pg_version(ConnectionClass *self)
1403
HSTMT hstmt;
1404
StatementClass *stmt;
1405
RETCODE result;
1406
-char *szVersion = "0.0";
+char szVersion[32];
1407
int major, minor;
1408
static char *func = "CC_lookup_pg_version";
1409
@@ -1439,6 +1439,7 @@ static char *func = "CC_lookup_pg_version";
1439
1440
/* Extract the Major and Minor numbers from the string. */
1441
/* This assumes the string starts 'Postgresql X.X' */
1442
+ strcpy(szVersion, "0.0");
1443
if (sscanf(self->pg_version, "%*s %d.%d", &major, &minor) >= 2) {
1444
sprintf(szVersion, "%d.%d", major, minor);
1445
self->pg_version_major = major;
0 commit comments