From 930ce39fa77766bfc55cab0ae441b101a7e71c7c Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 11 Mar 2025 19:42:06 +0000 Subject: [PATCH] ext/pgsql: get_field_name helper, remove precaution for pg_type request. it is an internal table and oid is a real Oid (uint32_t) value. --- ext/pgsql/pgsql.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 036fc5c0572a1..3210409ba385f 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1670,8 +1670,7 @@ static zend_string *get_field_name(PGconn *pgsql, Oid oid) continue; } - char *end_ptr; - Oid tmp_oid = strtoul(tmp_oid_str, &end_ptr, 10); + Oid tmp_oid = strtoul(tmp_oid_str, NULL, 10); zend_string *name = zend_string_init(tmp_name, strlen(tmp_name), 0); zend_hash_index_update_ptr(&PGG(field_oids), tmp_oid, name);