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 64d85587de
commit f5f02ae0ee
2 changed files with 13 additions and 13 deletions

View File

@@ -1057,7 +1057,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));