]> granicus.if.org Git - php/commitdiff
fix possible pointer truncation
authorAnatol Belski <ab@php.net>
Sun, 14 Sep 2014 10:18:52 +0000 (12:18 +0200)
committerAnatol Belski <ab@php.net>
Sun, 14 Sep 2014 10:18:52 +0000 (12:18 +0200)
ext/odbc/php_odbc.c

index 02af2d94ca1aef96cf4bea29507a78334664f83e..c6dc8289e18eeeee581b62576e3ff762134e24b6 100644 (file)
@@ -2615,13 +2615,13 @@ try_and_get_another_connection:
                zend_resource *index_ptr, new_index_ptr;
                
                if ((index_ptr = zend_hash_str_find_ptr(&EG(regular_list), hashed_details, hashed_len)) != NULL) {
-                       int conn_id;
+                       zend_ulong conn_id;
                        zend_resource *p;
 
                        if (index_ptr->type != le_index_ptr) {
                                RETURN_FALSE;
                        }
-                       conn_id = (int)index_ptr->ptr;
+                       conn_id = (zend_ulong)index_ptr->ptr;
                        p = zend_hash_index_find_ptr(&EG(regular_list), conn_id);   /* check if the connection is still there */
 
                        if (p && p->ptr && (p->type == le_conn || p->type == le_pconn)) {