Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 27ed8ac

Browse files
author
Hiroshi Inoue
committed
Fix a misuse of 'char *' declaration.
1 parent 897a895 commit 27ed8ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/interfaces/odbc/connection.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ CC_lookup_pg_version(ConnectionClass *self)
14031403
HSTMT hstmt;
14041404
StatementClass *stmt;
14051405
RETCODE result;
1406-
char *szVersion = "0.0";
1406+
char szVersion[32];
14071407
int major, minor;
14081408
static char *func = "CC_lookup_pg_version";
14091409

@@ -1439,6 +1439,7 @@ static char *func = "CC_lookup_pg_version";
14391439

14401440
/* Extract the Major and Minor numbers from the string. */
14411441
/* This assumes the string starts 'Postgresql X.X' */
1442+
strcpy(szVersion, "0.0");
14421443
if (sscanf(self->pg_version, "%*s %d.%d", &major, &minor) >= 2) {
14431444
sprintf(szVersion, "%d.%d", major, minor);
14441445
self->pg_version_major = major;

0 commit comments

Comments
 (0)