mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-02-03 14:01:57 +02:00
[Issue #260] fix integer overflow
This commit is contained in:
parent
ee6d0327de
commit
4db8231462
@ -1269,7 +1269,7 @@ get_database_map(PGconn *conn)
|
||||
db_map_entry *db_entry = (db_map_entry *) pgut_malloc(sizeof(db_map_entry));
|
||||
|
||||
/* get Oid */
|
||||
db_entry->dbOid = atoi(PQgetvalue(res, i, 0));
|
||||
db_entry->dbOid = atoll(PQgetvalue(res, i, 0));
|
||||
|
||||
/* get datname */
|
||||
datname = PQgetvalue(res, i, 1);
|
||||
@ -2644,7 +2644,7 @@ IdentifySystem(StreamThreadArg *stream_thread_arg)
|
||||
}
|
||||
|
||||
stream_conn_sysidentifier_str = PQgetvalue(res, 0, 0);
|
||||
stream_conn_tli = atoi(PQgetvalue(res, 0, 1));
|
||||
stream_conn_tli = atoll(PQgetvalue(res, 0, 1));
|
||||
|
||||
/* Additional sanity, primary for PG 9.5,
|
||||
* where system id can be obtained only via "IDENTIFY SYSTEM"
|
||||
|
@ -439,7 +439,7 @@ get_index_list(const char *dbname, bool first_db_with_amcheck,
|
||||
char *namespace = NULL;
|
||||
|
||||
/* index oid */
|
||||
ind->indexrelid = atoi(PQgetvalue(res, i, 0));
|
||||
ind->indexrelid = atoll(PQgetvalue(res, i, 0));
|
||||
|
||||
/* index relname */
|
||||
name = PQgetvalue(res, i, 1);
|
||||
|
@ -284,8 +284,8 @@ pg_ptrack_clear(PGconn *backup_conn, int ptrack_version_num)
|
||||
if (strcmp(dbname, "template0") == 0)
|
||||
continue;
|
||||
|
||||
dbOid = atoi(PQgetvalue(res_db, i, 1));
|
||||
tblspcOid = atoi(PQgetvalue(res_db, i, 2));
|
||||
dbOid = atoll(PQgetvalue(res_db, i, 1));
|
||||
tblspcOid = atoll(PQgetvalue(res_db, i, 2));
|
||||
|
||||
tmp_conn = pgut_connect(instance_config.conn_opt.pghost, instance_config.conn_opt.pgport,
|
||||
dbname,
|
||||
|
Loading…
x
Reference in New Issue
Block a user