[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ php_crypt_r.c

2009-11-02 Thread Pierre-Alain Joye
pajoye   Mon, 02 Nov 2009 23:02:16 +

Revision: http://svn.php.net/viewvc?view=revision&revision=290155

Log:
- WS

Changed paths:
U   php/php-src/trunk/ext/standard/php_crypt_r.c

Modified: php/php-src/trunk/ext/standard/php_crypt_r.c
===
--- php/php-src/trunk/ext/standard/php_crypt_r.c2009-11-02 20:46:52 UTC 
(rev 290154)
+++ php/php-src/trunk/ext/standard/php_crypt_r.c2009-11-02 23:02:16 UTC 
(rev 290155)
@@ -205,11 +205,11 @@
memcpy(passwd, MD5_MAGIC, MD5_MAGIC_LEN);

 #if _MSC_VER >= 1500
-   if (strncpy_s(passwd + MD5_MAGIC_LEN, MD5_HASH_MAX_LEN - MD5_MAGIC_LEN, 
sp, sl + 1) != 0) {
-   goto _destroyCtx1;
-   }
+   if (strncpy_s(passwd + MD5_MAGIC_LEN, MD5_HASH_MAX_LEN - MD5_MAGIC_LEN, 
sp, sl + 1) != 0) {
+   goto _destroyCtx1;
+   }
passwd[MD5_MAGIC_LEN + sl] = '\0';
-   strcat_s(passwd, MD5_HASH_MAX_LEN, "$");
+   strcat_s(passwd, MD5_HASH_MAX_LEN, "$");
 #else
/* VC6 version doesn't have strcat_s or strncpy_s */
if (strncpy(passwd + MD5_MAGIC_LEN, sp, sl + 1) < sl) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/php_crypt_r.c branches/PHP_5_3/ext/standard/tests/strings/bug50052.phpt branches/PHP_5_3_1/NEWS branches/PHP_5_3_1/ext/standard/php_crypt_r.c

2009-11-02 Thread Pierre-Alain Joye
pajoye   Mon, 02 Nov 2009 20:46:52 +

Revision: http://svn.php.net/viewvc?view=revision&revision=290154

Log:
- Fixed #50052, Different Hashes on Windows and Linux on wrong Salt size

Bug: http://bugs.php.net/50052 (Assigned) Crypt - Different Hashes on Windows 
and Linux on wrong Salt size
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c
A   php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug50052.phpt
U   php/php-src/branches/PHP_5_3_1/NEWS
U   php/php-src/branches/PHP_5_3_1/ext/standard/php_crypt_r.c
A   php/php-src/branches/PHP_5_3_1/ext/standard/tests/strings/bug50052.phpt
U   php/php-src/trunk/ext/standard/php_crypt_r.c
A   php/php-src/trunk/ext/standard/tests/strings/bug50052.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c 2009-11-02 
20:10:03 UTC (rev 290153)
+++ php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c 2009-11-02 
20:46:52 UTC (rev 290154)
@@ -208,6 +208,7 @@
if (strncpy_s(passwd + MD5_MAGIC_LEN, MD5_HASH_MAX_LEN - MD5_MAGIC_LEN, 
sp, sl + 1) != 0) {
goto _destroyCtx1;
}
+   passwd[MD5_MAGIC_LEN + sl] = '\0';
strcat_s(passwd, MD5_HASH_MAX_LEN, "$");
 #else
/* VC6 version doesn't have strcat_s or strncpy_s */

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug50052.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug50052.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug50052.phpt   
2009-11-02 20:46:52 UTC (rev 290154)
@@ -0,0 +1,12 @@
+--TEST--
+Bug #50052 (Different Hashes on Windows and Linux on wrong Salt size)
+--FILE--
+
+--EXPECT--
+$1$f+uslYF01$
+$1$f+uslYF0$orVloNmKSLvOeswusE0bY.

Modified: php/php-src/branches/PHP_5_3_1/NEWS
===
--- php/php-src/branches/PHP_5_3_1/NEWS 2009-11-02 20:10:03 UTC (rev 290153)
+++ php/php-src/branches/PHP_5_3_1/NEWS 2009-11-02 20:46:52 UTC (rev 290154)
@@ -7,6 +7,8 @@

 - Fixed crash in com_print_typeinfo when an invalid typelib is given. (Pierre)

+- Fuxed bug #50052 (Different Hashes on Windows and Linux on wrong Salt size).
+  (Pierre)
 - Fixed bug #49908 (throwing exception in __autoload crashes when interface
   is not defined). (Felipe)
 - Fixed bug #49142 (crash when exception thrown from __tostring()).

Modified: php/php-src/branches/PHP_5_3_1/ext/standard/php_crypt_r.c
===
--- php/php-src/branches/PHP_5_3_1/ext/standard/php_crypt_r.c   2009-11-02 
20:10:03 UTC (rev 290153)
+++ php/php-src/branches/PHP_5_3_1/ext/standard/php_crypt_r.c   2009-11-02 
20:46:52 UTC (rev 290154)
@@ -208,6 +208,7 @@
if (strncpy_s(passwd + MD5_MAGIC_LEN, MD5_HASH_MAX_LEN - MD5_MAGIC_LEN, 
sp, sl + 1) != 0) {
goto _destroyCtx1;
}
+   passwd[MD5_MAGIC_LEN + sl] = '\0';
strcat_s(passwd, MD5_HASH_MAX_LEN, "$");
 #else
/* VC6 version doesn't have strcat_s or strncpy_s */

Added: php/php-src/branches/PHP_5_3_1/ext/standard/tests/strings/bug50052.phpt
===
--- php/php-src/branches/PHP_5_3_1/ext/standard/tests/strings/bug50052.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_3_1/ext/standard/tests/strings/bug50052.phpt 
2009-11-02 20:46:52 UTC (rev 290154)
@@ -0,0 +1,12 @@
+--TEST--
+Bug #20934 (html_entity_decode() crash when "" is passed)
+--FILE--
+
+--EXPECT--
+$1$f+uslYF01$
+$1$f+uslYF0$orVloNmKSLvOeswusE0bY.

Modified: php/php-src/trunk/ext/standard/php_crypt_r.c
===
--- php/php-src/trunk/ext/standard/php_crypt_r.c2009-11-02 20:10:03 UTC 
(rev 290153)
+++ php/php-src/trunk/ext/standard/php_crypt_r.c2009-11-02 20:46:52 UTC 
(rev 290154)
@@ -208,6 +208,7 @@
if (strncpy_s(passwd + MD5_MAGIC_LEN, MD5_HASH_MAX_LEN - MD5_MAGIC_LEN, 
sp, sl + 1) != 0) {
goto _destroyCtx1;
}
+   passwd[MD5_MAGIC_LEN + sl] = '\0';
strcat_s(passwd, MD5_HASH_MAX_LEN, "$");
 #else
/* VC6 version doesn't have strcat_s or strncpy_s */

Added: php/php-src/trunk/ext/standard/tests/strings/bug50052.phpt
===
--- php/php-src/trunk/ext/standard/tests/strings/bug50052.phpt  
(rev 0)
+++ php/php-src/trunk/ext/standard/tests/strings/bug50052.phpt  2009-11-02 
20:46:52 UTC (rev 290154)
@@ -0,0 +1,12 @@
+--TEST--
+Bug #50052 (Different Hashes on Windows and Linux on wrong Salt size)
+--FILE--
+
+--EXPECT--
+$1$f+uslYF01$
+$1$f+uslYF0$orVloNmKSLvOeswusE0

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_1/ NEWS Zend/tests/bug49908.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h tests/security/open_basedir_parse_ini_file.phpt

2009-11-02 Thread Pierre-Alain Joye
pajoye   Mon, 02 Nov 2009 18:11:33 +

Revision: http://svn.php.net/viewvc?view=revision&revision=290152

Log:
- Merge 290129, Fixed bug #49908 (throwing exception in __autoload crashes when 
interface is not defined)

Bug: http://bugs.php.net/49908 (Closed) throwing exception in __autoload 
crashes when interface is not defined
  
Changed paths:
_U  php/php-src/branches/PHP_5_3_1/
UU  php/php-src/branches/PHP_5_3_1/NEWS
A + php/php-src/branches/PHP_5_3_1/Zend/tests/bug49908.phpt
(from php/php-src/branches/PHP_5_3/Zend/tests/bug49908.phpt:r290129)
U   php/php-src/branches/PHP_5_3_1/Zend/zend_vm_def.h
U   php/php-src/branches/PHP_5_3_1/Zend/zend_vm_execute.h
_U  php/php-src/branches/PHP_5_3_1/ext/mysql/
_U  php/php-src/branches/PHP_5_3_1/ext/mysqli/
_U  php/php-src/branches/PHP_5_3_1/ext/mysqlnd/
_U  php/php-src/branches/PHP_5_3_1/ext/pdo_mysql/
_U  php/php-src/branches/PHP_5_3_1/ext/tidy/tests/
_U  
php/php-src/branches/PHP_5_3_1/tests/security/open_basedir_parse_ini_file.phpt


Property changes on: php/php-src/branches/PHP_5_3_1
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:288351,289341,289612,289621-289624,289666-289667,289690,289706,289752,289763,289768,289779,289987,289990,290029
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:288351,289341,289612,289621-289624,289666-289667,289690,289706,289752,289763,289768,289779,289987,289990,290029,290129,290147
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_1/NEWS
===
--- php/php-src/branches/PHP_5_3_1/NEWS	2009-11-02 17:56:20 UTC (rev 290151)
+++ php/php-src/branches/PHP_5_3_1/NEWS	2009-11-02 18:11:33 UTC (rev 290152)
@@ -7,6 +7,8 @@

 - Fixed crash in com_print_typeinfo when an invalid typelib is given. (Pierre)

+- Fixed bug #49908 (throwing exception in __autoload crashes when interface
+  is not defined). (Felipe)
 - Fixed bug #49142 (crash when exception thrown from __tostring()).
   (David Soria Parra)
 - Fixed bug #49986 (Missing ICU DLLs on windows package). (Pierre)


Property changes on: php/php-src/branches/PHP_5_3_1/NEWS
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3/NEWS:288028,288034,288067,288081,288083,288085,288087-288088,288096,288111,288116-288117,288159,288202-288204,288208,288215,288246,288263,288265,288267,288329,288339,288351,288354,288378-288379,288393,288396,288411,288437,288439,288446-288448,288462,288510-288511,288514-288518,288522-288524,288531,288537,288541,288547-288548,288555,288562,288571,288575,288580,288583,288585,288598,288603,288638,288644,288653,288676,288679,288705,288741,288743,288745-288747,288749,288784,288793,288834,288892-288893,288896,288940,288943,288945,288953,288973,289004,289019,289027-289028,289030,289039,289046,289049,289076,289123,289214,289216,289247,289249,289285,289339,289341,289351,289366,289368,289372,289445-289446,289531,289546-289547,289557,289568,289581,289587,289612,289621-289624,289666-289667,289779,289987,289990,290029
/php/php-src/trunk/NEWS:284726
   + /php/php-src/branches/PHP_5_3/NEWS:288028,288034,288067,288081,288083,288085,288087-288088,288096,288111,288116-288117,288159,288202-288204,288208,288215,288246,288263,288265,288267,288329,288339,288351,288354,288378-288379,288393,288396,288411,288437,288439,288446-288448,288462,288510-288511,288514-288518,288522-288524,288531,288537,288541,288547-288548,288555,288562,288571,288575,288580,288583,288585,288598,288603,288638,288644,288653,288676,288679,288705,288741,288743,288745-288747,288749,288784,288793,288834,288892-288893,288896,288940,288943,288945,288953,288973,289004,289019,289027-289028,289030,289039,289046,289049,289076,289123,289214,289216,289247,289249,289285,289339,289341,289351,289366,289368,289372,289445-289446,289531,289546-289547,289557,289568,289581,289587,289612,289621-289624,289666-289667,289779,289987,289990,290029,290129,290147
/php/php-src/trunk/NEWS:284726

Copied: php/php-src/branches/PHP_5_3_1/Zend/tests/bug49908.phpt (from rev 290129, php/php-src/branches/PHP_5_3/Zend/tests/bug49908.phpt)
===
--- php/php-src/branches/PHP_5_3_1/Zend/tests/bug49908.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3_1/Zend/tests/bug49908.phpt	2009-11-02 18:11:33 UTC (rev 290152)
@@ -0,0 +1,28 @@
+--TEST--
+Bug #49908 (throwing exception in __autoload crashes when interface is not defined)
+--FILE--
+
+--EXPECTF--
+%unicode|string%(3) "Foo"
+%unicode|string%(3) "Bar"
+
+Fatal error: Uncaught exception 'Exception' with message 'Bar' in %s:%d
+Stack trace:
+#0 %s(7): __autoload('Bar')
+#1 %s(13): __autoload('Foo')
+#2 {main}
+  thrown in %s on line %d

Modified: php/php-src/branches/PHP_5_3_1/Zend/zend_vm_def.h
=

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/standard/formatted_print.c branches/PHP_5_2/ext/standard/tests/bug49244.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard

2009-11-02 Thread Felipe Pena
felipe   Mon, 02 Nov 2009 17:37:32 +

Revision: http://svn.php.net/viewvc?view=revision&revision=290150

Log:
- Fixed bug #49244 (Floating point NaN cause garbage characters). (patch by 
Sjoerd)

Bug: http://bugs.php.net/49244 (Assigned) [PATCH] Floating point NaN cause 
garbage characters
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/standard/formatted_print.c
A   php/php-src/branches/PHP_5_2/ext/standard/tests/bug49244.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/formatted_print.c
A   php/php-src/branches/PHP_5_3/ext/standard/tests/bug49244.phpt
U   php/php-src/trunk/ext/standard/formatted_print.c
A   php/php-src/trunk/ext/standard/tests/bug49244.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-11-02 16:12:40 UTC (rev 290149)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-11-02 17:37:32 UTC (rev 290150)
@@ -57,6 +57,7 @@
 - Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrongly converted).
   (Moriyoshi)
 - Fixed bug #49332 (Build error with Snow Leopard). (Scott)
+- Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd)
 - Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
 - Fixed bug #48764 (PDO_pgsql::query() always uses implicit prepared statements
   if v3 proto available). (Matteo, Mark Kirkwood)

Modified: php/php-src/branches/PHP_5_2/ext/standard/formatted_print.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/formatted_print.c 2009-11-02 
16:12:40 UTC (rev 290149)
+++ php/php-src/branches/PHP_5_2/ext/standard/formatted_print.c 2009-11-02 
17:37:32 UTC (rev 290150)
@@ -232,14 +232,14 @@
if (zend_isnan(number)) {
is_negative = (number<0);
php_sprintf_appendstring(buffer, pos, size, "NaN", 3, 0, 
padding,
-alignment, 
precision, is_negative, 0, always_sign);
+alignment, 3, 
is_negative, 0, always_sign);
return;
}

if (zend_isinf(number)) {
is_negative = (number<0);
php_sprintf_appendstring(buffer, pos, size, "INF", 3, 0, 
padding,
-alignment, 
precision, is_negative, 0, always_sign);
+alignment, 3, 
is_negative, 0, always_sign);
return;
}


Added: php/php-src/branches/PHP_5_2/ext/standard/tests/bug49244.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/bug49244.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/bug49244.phpt   
2009-11-02 17:37:32 UTC (rev 290150)
@@ -0,0 +1,32 @@
+--TEST--
+Bug #49244 (Floating point NaN cause garbage characters)
+--FILE--
+
+--EXPECT--
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN
+{NaN} NaN


Property changes on: 
php/php-src/branches/PHP_5_2/ext/standard/tests/bug49244.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-11-02 16:12:40 UTC (rev 290149)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-11-02 17:37:32 UTC (rev 290150)
@@ -32,6 +32,7 @@
 - Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning).
   (Ilia, wmeler at wp-sa dot pl)
 - Fixed bug #49647 (DOMUserData does not exist). (Rob)
+- Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd)
 - Fixed bug #49224 (Compile error due to old DNS functions on AIX systems).
   (Scott)


Modified: php/php-src/branches/PHP_5_3/ext/standard/formatted_print.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/formatted_print.c 2009-11-02 
16:12:40 UTC (rev 290149)
+++ php/php-src/branches/PHP_5_3/ext/standard/formatted_print.c 2009-11-02 
17:37:32 UTC (rev 290150)
@@ -232,14 +232,14 @@
if (zend_isnan(number)) {
is_negative = (number<0);
php_sprintf_appendstring(buffer, pos, size, "NaN", 3, 0, 
padding,
-alignment, 
precision, is_negative, 0, always_sign);
+alignment, 3, 
is_nega

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/pgsql.c trunk/ext/pgsql/pgsql.c

2009-11-02 Thread Ilia Alshanetsky
iliaaMon, 02 Nov 2009 13:33:24 +

Revision: http://svn.php.net/viewvc?view=revision&revision=290146

Log:
Fixed compiler warnings

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c
U   php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c
U   php/php-src/trunk/ext/pgsql/pgsql.c

Modified: php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c
===
--- php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c  2009-11-02 13:02:48 UTC 
(rev 290145)
+++ php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c  2009-11-02 13:33:24 UTC 
(rev 290146)
@@ -363,7 +363,7 @@
if (PGG(log_notices)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", 
notice->message);
}
-   zend_hash_index_update(&PGG(notices), (int)resource_id, (void 
**)¬ice, sizeof(php_pgsql_notice *), NULL);
+   zend_hash_index_update(&PGG(notices), (ulong)resource_id, (void 
**)¬ice, sizeof(php_pgsql_notice *), NULL);
}
 }
 /* }}} */
@@ -761,13 +761,14 @@
 */
if (!(connect_type & PGSQL_CONNECT_FORCE_NEW)
&& 
zend_hash_find(&EG(regular_list),str.c,str.len+1,(void **) 
&index_ptr)==SUCCESS) {
-   int type,link;
+   int type;
+   ulong link;
void *ptr;

if (Z_TYPE_P(index_ptr) != le_index_ptr) {
RETURN_FALSE;
}
-   link = (int) index_ptr->ptr;
+   link = (uintptr_t) index_ptr->ptr;
ptr = zend_list_find(link,&type);   /* check if the 
link is still there */
if (ptr && (type==le_link || type==le_plink)) {
Z_LVAL_P(return_value) = link;
@@ -1754,14 +1755,15 @@


if (return_oid) {
+#if UINT_MAX > LONG_MAX /* Oid is unsigned int, we don't need this code, where 
LONG is wider */
if (oid > LONG_MAX) {
smart_str oidstr = {0};
smart_str_append_unsigned(&oidstr, oid);
smart_str_0(&oidstr);
RETURN_STRINGL(oidstr.c, oidstr.len, 0);
-   } else {
+   } else
+#endif
RETURN_LONG((long)oid);
-   }
}

/* try to lookup the table name in the resource list */
@@ -1859,7 +1861,7 @@
case PHP_PG_FIELD_TYPE_OID:

oid = PQftype(pgsql_result, Z_LVAL_PP(field));
-
+#if UINT_MAX > LONG_MAX
if (oid > LONG_MAX) {
smart_str s = {0};
smart_str_append_unsigned(&s, oid);
@@ -1867,8 +1869,8 @@
Z_STRVAL_P(return_value) = s.c;
Z_STRLEN_P(return_value) = s.len;
Z_TYPE_P(return_value) = IS_STRING;
-   }
-   else
+   } else
+#endif
{
Z_LVAL_P(return_value) = (long)oid;
Z_TYPE_P(return_value) = IS_LONG;
@@ -5767,8 +5769,8 @@
 {
zval *row;
char *field_name, *element, *data;
-   size_t num_fields, element_len, data_len;
-   int pg_numrows, pg_row;
+   size_t num_fields, element_len;
+   int data_len, pg_numrows, pg_row;
uint i;
assert(Z_TYPE_P(ret_array) == IS_ARRAY);


Modified: php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c
===
--- php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c  2009-11-02 13:02:48 UTC 
(rev 290145)
+++ php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c  2009-11-02 13:33:24 UTC 
(rev 290146)
@@ -819,7 +819,7 @@
if (PGG(log_notices)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", 
notice->message);
}
-   zend_hash_index_update(&PGG(notices), (int)resource_id, (void 
**)¬ice, sizeof(php_pgsql_notice *), NULL);
+   zend_hash_index_update(&PGG(notices), (ulong)resource_id, (void 
**)¬ice, sizeof(php_pgsql_notice *), NULL);
}
 }
 /* }}} */
@@ -1217,13 +1217,14 @@
 */
if (!(connect_type & PGSQL_CONNECT_FORCE_NEW)
&& 
zend_hash_find(&EG(regular_list),str.c,str.len+1,(void **) 
&index_ptr)==SUCCESS) {
-   int type,link;
+   int type;
+   ulong link;
void *ptr;

if (Z_TYPE_P(index_ptr) != le_index_ptr) {
RETURN_FALSE;
}
-   link = (int) index_ptr->ptr;
+