cvs: php-gtk /ext/gtk+ gtk.overrides

From: Date: Tue, 29 Jan 2002 20:34:08 +0000
Subject: cvs: php-gtk /ext/gtk+ gtk.overrides
Groups: php.gtk.cvs 
Request: Send a blank email to php-gtk-cvs+get-473@lists.php.net to get a copy of this message
mfischer Tue Jan 29 15:34:08 2002 EDT Modified files: /php-gtk/ext/gtk+ gtk.overrides Log: - gtk_clist_append(): fix possible crash when array size `> columns Index: php-gtk/ext/gtk+/gtk.overrides diff -u php-gtk/ext/gtk+/gtk.overrides:1.47 php-gtk/ext/gtk+/gtk.overrides:1.48 --- php-gtk/ext/gtk+/gtk.overrides:1.47 Tue Jan 22 18:41:50 2002 +++ php-gtk/ext/gtk+/gtk.overrides Tue Jan 29 15:34:08 2002 @@ -702,8 +702,9 @@ } columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns; - if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) { - php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name(TSRMLS_C)); + if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) != columns) { + php_error(E_WARNING, "%s(): the array of strings (%d) does not match the number of columns (%d)", + get_active_function_name(TSRMLS_C), zend_hash_num_elements(Z_ARRVAL_P(php_list)), columns); return; }

« previous php.gtk.cvs (#473) next »