Replace remaining instances of strcpy() with strncpy()

Also use strncmp() to match.
This commit is contained in:
Ian Barwick
2018-02-15 13:17:06 +09:00
parent a8232337d8
commit b47448d0e5
2 changed files with 13 additions and 13 deletions

View File

@@ -1060,7 +1060,7 @@ get_server_version(PGconn *conn, char *server_version)
}
if (server_version != NULL)
strcpy(server_version, PQgetvalue(res, 0, 1));
strncpy(server_version, PQgetvalue(res, 0, 1), MAXVERSIONSTR);
server_version_num = atoi(PQgetvalue(res, 0, 0));