[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2009-06-19 Thread Kalle Sommer Nielsen
kalle   Fri Jun 19 22:15:44 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  MFH: Fix memleak
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.40r2=1.312.2.20.2.41diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.40 php-src/ext/gd/gd.c:1.312.2.20.2.41
--- php-src/ext/gd/gd.c:1.312.2.20.2.40 Thu May 28 14:06:06 2009
+++ php-src/ext/gd/gd.c Fri Jun 19 22:15:44 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.40 2009/05/28 14:06:06 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.41 2009/06/19 22:15:44 kalle Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2189,7 +2189,6 @@
pPrintWindow(window, memDC, (UINT) client_area);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Windows API too 
old);
-   RETURN_FALSE;
goto clean;
}
 



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2009-05-28 Thread Pierre-Alain Joye
pajoye  Thu May 28 14:06:06 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  - fix build with system gd
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.39r2=1.312.2.20.2.40diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.39 php-src/ext/gd/gd.c:1.312.2.20.2.40
--- php-src/ext/gd/gd.c:1.312.2.20.2.39 Sun Mar 29 17:04:05 2009
+++ php-src/ext/gd/gd.c Thu May 28 14:06:06 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.39 2009/03/29 17:04:05 iliaa Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.40 2009/05/28 14:06:06 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -73,7 +73,8 @@
 #include gdfontmb.h /* 3 Medium bold font */
 #include gdfontl.h  /* 4 Large font */
 #include gdfontg.h  /* 5 Giant font */
-#include gdhelpers.h
+#include libgd/gdhelpers.h
+
 #ifdef HAVE_GD_WBMP
 #include libgd/wbmp.h
 #endif



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2009-03-29 Thread Ilia Alshanetsky
iliaa   Sun Mar 29 17:04:05 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  
  Fixed compiler warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.38r2=1.312.2.20.2.39diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.38 php-src/ext/gd/gd.c:1.312.2.20.2.39
--- php-src/ext/gd/gd.c:1.312.2.20.2.38 Sat Jan 31 15:28:34 2009
+++ php-src/ext/gd/gd.c Sun Mar 29 17:04:05 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.38 2009/01/31 15:28:34 kalle Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.39 2009/03/29 17:04:05 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -73,6 +73,7 @@
 #include gdfontmb.h /* 3 Medium bold font */
 #include gdfontl.h  /* 4 Large font */
 #include gdfontg.h  /* 5 Giant font */
+#include gdhelpers.h
 #ifdef HAVE_GD_WBMP
 #include libgd/wbmp.h
 #endif



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2009-01-31 Thread Kalle Sommer Nielsen
kalle   Sat Jan 31 15:28:34 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  MFH: Fix arginfo for imagefilter()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.37r2=1.312.2.20.2.38diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.37 php-src/ext/gd/gd.c:1.312.2.20.2.38
--- php-src/ext/gd/gd.c:1.312.2.20.2.37 Wed Dec 31 11:17:37 2008
+++ php-src/ext/gd/gd.c Sat Jan 31 15:28:34 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.37 2008/12/31 11:17:37 sebastian Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.38 2009/01/31 15:28:34 kalle Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -966,6 +966,7 @@
ZEND_ARG_INFO(0, arg1)
ZEND_ARG_INFO(0, arg2)
ZEND_ARG_INFO(0, arg3)
+   ZEND_ARG_INFO(0, arg4)
 ZEND_END_ARG_INFO()
 
 static



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c /ext/gd/tests imageloadfont_invalid.phpt

2008-07-17 Thread Pierre-Alain Joye
pajoye  Thu Jul 17 22:58:24 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/gd/tests   imageloadfont_invalid.phpt 

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  - MFB: fix crash when some crafted font are given
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.35r2=1.312.2.20.2.36diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.35 php-src/ext/gd/gd.c:1.312.2.20.2.36
--- php-src/ext/gd/gd.c:1.312.2.20.2.35 Sun May  4 21:19:17 2008
+++ php-src/ext/gd/gd.c Thu Jul 17 22:58:23 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.35 2008/05/04 21:19:17 colder Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.36 2008/07/17 22:58:23 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1636,6 +1636,22 @@
font-nchars = FLIPWORD(font-nchars);
body_size = font-w * font-h * font-nchars;
}
+
+   if (overflow2(font-nchars, font-h)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Error reading 
font, invalid font header);
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+   if (overflow2(font-nchars * font-h, font-w )) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Error reading 
font, invalid font header);
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+
+
+
 
if (body_size != body_size_check) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Error reading 
font);

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imageloadfont_invalid.phpt?view=markuprev=1.1
Index: php-src/ext/gd/tests/imageloadfont_invalid.phpt
+++ php-src/ext/gd/tests/imageloadfont_invalid.phpt



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c /ext/ldap ldap.c /ext/openssl openssl.c /ext/standard file.c streamsfuncs.c uniqid.c

2008-05-04 Thread Etienne Kneuss
colder  Sun May  4 21:19:18 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
/php-src/ext/ldap   ldap.c 
/php-src/ext/opensslopenssl.c 
/php-src/ext/standard   file.c streamsfuncs.c uniqid.c 
  Log:
  MFH: Fix protos
  http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.34r2=1.312.2.20.2.35diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.34 php-src/ext/gd/gd.c:1.312.2.20.2.35
--- php-src/ext/gd/gd.c:1.312.2.20.2.34 Fri Apr  4 17:39:52 2008
+++ php-src/ext/gd/gd.c Sun May  4 21:19:17 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.34 2008/04/04 17:39:52 felipe Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.35 2008/05/04 21:19:17 colder Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4548,7 +4548,7 @@
 }
 /* }}} */
 
-/* {{{ proto array imagepstext(resource image, string text, resource font, int 
size, int foreground, int background, int xcoord, int ycoord [, int space, int 
tightness, float angle, int antialias])
+/* {{{ proto array imagepstext(resource image, string text, resource font, int 
size, int foreground, int background, int xcoord, int ycoord [, int space [, 
int tightness [, float angle [, int antialias)
Rasterize a string over an image */
 PHP_FUNCTION(imagepstext)
 {
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.161.2.3.2.12r2=1.161.2.3.2.13diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.161.2.3.2.12 
php-src/ext/ldap/ldap.c:1.161.2.3.2.13
--- php-src/ext/ldap/ldap.c:1.161.2.3.2.12  Mon Dec 31 07:20:07 2007
+++ php-src/ext/ldap/ldap.c Sun May  4 21:19:17 2008
@@ -23,7 +23,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.161.2.3.2.12 2007/12/31 07:20:07 sebastian Exp $ */
+/* $Id: ldap.c,v 1.161.2.3.2.13 2008/05/04 21:19:17 colder Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -322,7 +322,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, LDAP Support, enabled);
-   php_info_print_table_row(2, RCS Version, $Id: ldap.c,v 
1.161.2.3.2.12 2007/12/31 07:20:07 sebastian Exp $);
+   php_info_print_table_row(2, RCS Version, $Id: ldap.c,v 
1.161.2.3.2.13 2008/05/04 21:19:17 colder Exp $);
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, %ld/unlimited, LDAPG(num_links));
@@ -471,7 +471,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool ldap_bind(resource link [, string dn, string password])
+/* {{{ proto bool ldap_bind(resource link [, string dn [, string password]])
Bind to LDAP directory */
 PHP_FUNCTION(ldap_bind)
 {
@@ -581,7 +581,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool ldap_sasl_bind(resource link [, string binddn, string 
password, string sasl_mech, string sasl_realm, string sasl_authc_id, string 
sasl_authz_id, string props])
+/* {{{ proto bool ldap_sasl_bind(resource link [, string binddn [, string 
password [, string sasl_mech [, string sasl_realm [, string sasl_authc_id [, 
string sasl_authz_id [, string props]]])
Bind to LDAP directory using SASL */
 PHP_FUNCTION(ldap_sasl_bind)
 {
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.45r2=1.98.2.5.2.46diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.45 
php-src/ext/openssl/openssl.c:1.98.2.5.2.46
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.45 Mon Apr  7 10:44:03 2008
+++ php-src/ext/openssl/openssl.c   Sun May  4 21:19:17 2008
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.98.2.5.2.45 2008/04/07 10:44:03 tony2001 Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.46 2008/05/04 21:19:17 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -2086,7 +2086,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool openssl_csr_new(array dn, resource privkey [, array 
configargs, array extraattribs])
+/* {{{ proto bool openssl_csr_new(array dn, resource privkey [, array 
configargs [, array extraattribs]])
Generates a privkey and CSR */
 PHP_FUNCTION(openssl_csr_new)
 {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.31r2=1.409.2.6.2.32diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.31 
php-src/ext/standard/file.c:1.409.2.6.2.32
--- php-src/ext/standard/file.c:1.409.2.6.2.31  Mon Dec 31 07:20:12 2007
+++ php-src/ext/standard/file.c Sun May  4 21:19:17 2008
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.409.2.6.2.31 2007/12/31 07:20:12 sebastian Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.32 2008/05/04 21:19:17 colder Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1129,7 +1129,7 @@
 }
 /* }}} 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2007-08-29 Thread Pierre-Alain Joye
pajoye  Wed Aug 29 06:26:30 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  - gd bug #102, alternative fix when an old library is used
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.30r2=1.312.2.20.2.31diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.30 php-src/ext/gd/gd.c:1.312.2.20.2.31
--- php-src/ext/gd/gd.c:1.312.2.20.2.30 Mon Jul 30 21:42:36 2007
+++ php-src/ext/gd/gd.c Wed Aug 29 06:26:30 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.30 2007/07/30 21:42:36 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.31 2007/08/29 06:26:30 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4353,6 +4353,9 @@
 {
zval **file;
int f_ind, *font;
+#ifdef PHP_WIN32
+   struct stat st;
+#endif
 
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, file) == 
FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -4360,6 +4363,13 @@
 
convert_to_string_ex(file);
 
+#ifdef PHP_WIN32
+   if (VCWD_STAT(Z_STRVAL_PP(file), st)  0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Font file not 
found (%s), Z_STRVAL_PP(file));
+   RETURN_FALSE;
+   }
+#endif
+
f_ind = T1_AddFont(Z_STRVAL_PP(file));
 
if (f_ind  0) {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2007-07-30 Thread Pierre-Alain Joye
pajoye  Mon Jul 30 21:42:36 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  - fix gd bug #102,  0 means that no load are loaded, return false
  - add error code in the warning
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.29r2=1.312.2.20.2.30diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.29 php-src/ext/gd/gd.c:1.312.2.20.2.30
--- php-src/ext/gd/gd.c:1.312.2.20.2.29 Wed Jun  6 09:45:43 2007
+++ php-src/ext/gd/gd.c Mon Jul 30 21:42:36 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.29 2007/06/06 09:45:43 tony2001 Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.30 2007/07/30 21:42:36 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4363,7 +4363,8 @@
f_ind = T1_AddFont(Z_STRVAL_PP(file));
 
if (f_ind  0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, T1Lib Error: %s, 
T1_StrError(f_ind));
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, T1Lib Error (%i): 
%s, f_ind, T1_StrError(f_ind));
+   RETURN_FALSE;
}
 
if (T1_LoadFont(f_ind)) {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2007-06-02 Thread Pierre-Alain Joye
pajoye  Sat Jun  2 15:38:10 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  - sx/sy must be  0 and  INT_MAX
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.26r2=1.312.2.20.2.27diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.26 php-src/ext/gd/gd.c:1.312.2.20.2.27
--- php-src/ext/gd/gd.c:1.312.2.20.2.26 Tue May 22 10:22:49 2007
+++ php-src/ext/gd/gd.c Sat Jun  2 15:38:09 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.26 2007/05/22 10:22:49 tony2001 Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.27 2007/06/02 15:38:09 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1718,7 +1718,9 @@
convert_to_long_ex(x_size);
convert_to_long_ex(y_size);
 
-   if (Z_LVAL_PP(x_size) = 0 || Z_LVAL_PP(y_size) = 0) {
+   if (Z_LVAL_PP(x_size) = 0 || Z_LVAL_PP(y_size) = 0 ||
+   Z_LVAL_PP(x_size) = INT_MAX || Z_LVAL_PP(y_size) = 
INT_MAX 
+   ) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid image 
dimensions);
RETURN_FALSE;
}
@@ -2326,7 +2328,9 @@
convert_to_long_ex(x_size);
convert_to_long_ex(y_size);
 
-   if (Z_LVAL_PP(x_size) = 0 || Z_LVAL_PP(y_size) = 0) {
+   if (Z_LVAL_PP(x_size) = 0 || Z_LVAL_PP(y_size) = 0 ||
+   Z_LVAL_PP(x_size) = INT_MAX || Z_LVAL_PP(y_size) = 
INT_MAX
+   ) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid image 
dimensions);
RETURN_FALSE;
}

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2007-04-24 Thread Jani Taskinen
sniper  Tue Apr 24 12:51:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  - fix compile warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.23r2=1.312.2.20.2.24diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.23 php-src/ext/gd/gd.c:1.312.2.20.2.24
--- php-src/ext/gd/gd.c:1.312.2.20.2.23 Tue Apr 17 15:44:23 2007
+++ php-src/ext/gd/gd.c Tue Apr 24 12:51:22 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.23 2007/04/17 15:44:23 bjori Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.24 2007/04/24 12:51:22 sniper Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2236,7 +2236,7 @@
}
 }
 /* }}} */
-#endif PHP_WIN32
+#endif /* PHP_WIN32 */
 
 #ifdef HAVE_GD_BUNDLED
 /* {{{ proto resource imagerotate(resource src_im, float angle, int bgdcolor 
[, int ignoretransparent])

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2007-04-17 Thread Pierre-Alain Joye
pajoye  Tue Apr 17 15:39:19 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  - INFO_EX not INFO
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.21r2=1.312.2.20.2.22diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.21 php-src/ext/gd/gd.c:1.312.2.20.2.22
--- php-src/ext/gd/gd.c:1.312.2.20.2.21 Tue Apr 17 15:31:45 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:39:19 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.21 2007/04/17 15:31:45 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.22 2007/04/17 15:39:19 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -319,7 +319,7 @@
 
 #ifdef PHP_WIN32
 static
-ZEND_BEGIN_ARG_INFO(arginfo_imagegrabwindow, 0, 0, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegrabwindow, 0, 0, 1)
ZEND_ARG_INFO(0, handle)
ZEND_ARG_INFO(0, client_area)
 ZEND_END_ARG_INFO()

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2007-04-17 Thread Hannes Magnusson
bjori   Tue Apr 17 15:44:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  Fix proto
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.22r2=1.312.2.20.2.23diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.22 php-src/ext/gd/gd.c:1.312.2.20.2.23
--- php-src/ext/gd/gd.c:1.312.2.20.2.22 Tue Apr 17 15:39:19 2007
+++ php-src/ext/gd/gd.c Tue Apr 17 15:44:23 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.22 2007/04/17 15:39:19 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.23 2007/04/17 15:44:23 bjori Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2180,7 +2180,7 @@
 }
 /* }}} */
 
-/* {{{ proto resource imagegrabscreen(int window_handle [, int client_area])
+/* {{{ proto resource imagegrabscreen()
Grab a screenshot */
 PHP_FUNCTION(imagegrabscreen)
 {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2007-04-05 Thread Pierre-Alain Joye
pajoye  Thu Apr  5 11:57:57 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  - reflect the real version to avoid confusions. Users should really use
only the bundled version
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.18r2=1.312.2.20.2.19diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.18 php-src/ext/gd/gd.c:1.312.2.20.2.19
--- php-src/ext/gd/gd.c:1.312.2.20.2.18 Thu Apr  5 09:33:10 2007
+++ php-src/ext/gd/gd.c Thu Apr  5 11:57:57 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.18 2007/04/05 09:33:10 tony2001 Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.19 2007/04/05 11:57:57 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1319,7 +1319,7 @@
 /* }}} */
 
 #if HAVE_GD_BUNDLED
-#define PHP_GD_VERSION_STRING bundled (2.0.28 compatible)
+#define PHP_GD_VERSION_STRING bundled (2.0.34 compatible)
 #elif HAVE_LIBGD20
 #define PHP_GD_VERSION_STRING 2.0 or higher
 #elif HAVE_GDIMAGECOLORRESOLVE

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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-09 Thread Nuno Lopes

On Mon, 8 Jan 2007, Nuno Lopes wrote:


nlopess Mon Jan  8 22:52:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c php_gd.h
  Log:
  avoid calling MSHUTDOWN when built without libt1


Is it really needed to clog the source code with those ifdefs? It's not
like this is a performance issue here...


I don't think this is clogging the code. I also think that any free 
speedup is welcome (even minor). Anyway this part of the code is rarely 
changed, so it shouldn't be any nightmare to maintain. (the ifdef was 
already there. I just moved it around)


Nuno 


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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-09 Thread Pierre

On 1/9/07, Nuno Lopes [EMAIL PROTECTED] wrote:

 On Mon, 8 Jan 2007, Nuno Lopes wrote:

 nlopess Mon Jan  8 22:52:23 2007 UTC

   Modified files:  (Branch: PHP_5_2)
 /php-src/ext/gd gd.c php_gd.h
   Log:
   avoid calling MSHUTDOWN when built without libt1

 Is it really needed to clog the source code with those ifdefs? It's not
 like this is a performance issue here...

I don't think this is clogging the code. I also think that any free
speedup is welcome (even minor). Anyway this part of the code is rarely
changed, so it shouldn't be any nightmare to maintain. (the ifdef was
already there. I just moved it around)


As I said, I have no real problem with such changes. I just feel like
they should not be done in a RC phase. Cleanup or speedup are
otherwise welcome :)

--Pierre

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-08 Thread Nuno Lopes
nlopess Mon Jan  8 22:52:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c php_gd.h 
  Log:
  avoid calling MSHUTDOWN when built without libt1
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.13r2=1.312.2.20.2.14diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.13 php-src/ext/gd/gd.c:1.312.2.20.2.14
--- php-src/ext/gd/gd.c:1.312.2.20.2.13 Fri Jan  5 15:06:55 2007
+++ php-src/ext/gd/gd.c Mon Jan  8 22:52:22 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.13 2007/01/05 15:06:55 iliaa Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.14 2007/01/08 22:52:22 nlopess Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1147,7 +1147,11 @@
gd,
gd_functions,
PHP_MINIT(gd),
+#if HAVE_LIBT1
PHP_MSHUTDOWN(gd),
+#else
+   NULL,
+#endif
NULL,
 #if HAVE_LIBGD20  HAVE_GD_STRINGFT  (HAVE_GD_FONTCACHESHUTDOWN || 
HAVE_GD_FREEFONTCACHE)
PHP_RSHUTDOWN(gd),
@@ -1191,16 +1195,16 @@
 }
 /* }}} */
 
+#if HAVE_LIBT1
 /* {{{ PHP_MSHUTDOWN_FUNCTION
  */
 PHP_MSHUTDOWN_FUNCTION(gd)
 {
-#if HAVE_LIBT1
T1_CloseLib();
-#endif
return SUCCESS;
 }
 /* }}} */
+#endif
 
 
 /* {{{ PHP_MINIT_FUNCTION
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/php_gd.h?r1=1.59.2.3.2.1r2=1.59.2.3.2.2diff_format=u
Index: php-src/ext/gd/php_gd.h
diff -u php-src/ext/gd/php_gd.h:1.59.2.3.2.1 
php-src/ext/gd/php_gd.h:1.59.2.3.2.2
--- php-src/ext/gd/php_gd.h:1.59.2.3.2.1Mon Jan  1 09:36:01 2007
+++ php-src/ext/gd/php_gd.h Mon Jan  8 22:52:22 2007
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.59.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_gd.h,v 1.59.2.3.2.2 2007/01/08 22:52:22 nlopess Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -66,7 +66,9 @@
 /* gd.c functions */
 PHP_MINFO_FUNCTION(gd);
 PHP_MINIT_FUNCTION(gd);
+#if HAVE_LIBT1
 PHP_MSHUTDOWN_FUNCTION(gd);
+#endif
 #if HAVE_LIBGD20  HAVE_GD_STRINGFT
 PHP_RSHUTDOWN_FUNCTION(gd);
 #endif

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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-08 Thread Derick Rethans
On Mon, 8 Jan 2007, Nuno Lopes wrote:

 nlopess   Mon Jan  8 22:52:23 2007 UTC
 
   Modified files:  (Branch: PHP_5_2)
 /php-src/ext/gd   gd.c php_gd.h 
   Log:
   avoid calling MSHUTDOWN when built without libt1

Is it really needed to clog the source code with those ifdefs? It's not 
like this is a performance issue here...

regards,
Derick


   
 http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.13r2=1.312.2.20.2.14diff_format=u
 Index: php-src/ext/gd/gd.c
 diff -u php-src/ext/gd/gd.c:1.312.2.20.2.13 
 php-src/ext/gd/gd.c:1.312.2.20.2.14
 --- php-src/ext/gd/gd.c:1.312.2.20.2.13   Fri Jan  5 15:06:55 2007
 +++ php-src/ext/gd/gd.c   Mon Jan  8 22:52:22 2007
 @@ -18,7 +18,7 @@
 +--+
   */
  
 -/* $Id: gd.c,v 1.312.2.20.2.13 2007/01/05 15:06:55 iliaa Exp $ */
 +/* $Id: gd.c,v 1.312.2.20.2.14 2007/01/08 22:52:22 nlopess Exp $ */
  
  /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
 Cold Spring Harbor Labs. */
 @@ -1147,7 +1147,11 @@
   gd,
   gd_functions,
   PHP_MINIT(gd),
 +#if HAVE_LIBT1
   PHP_MSHUTDOWN(gd),
 +#else
 + NULL,
 +#endif
   NULL,
  #if HAVE_LIBGD20  HAVE_GD_STRINGFT  (HAVE_GD_FONTCACHESHUTDOWN || 
 HAVE_GD_FREEFONTCACHE)
   PHP_RSHUTDOWN(gd),
 @@ -1191,16 +1195,16 @@
  }
  /* }}} */
  
 +#if HAVE_LIBT1
  /* {{{ PHP_MSHUTDOWN_FUNCTION
   */
  PHP_MSHUTDOWN_FUNCTION(gd)
  {
 -#if HAVE_LIBT1
   T1_CloseLib();
 -#endif
   return SUCCESS;
  }
  /* }}} */
 +#endif
  
  
  /* {{{ PHP_MINIT_FUNCTION
 http://cvs.php.net/viewvc.cgi/php-src/ext/gd/php_gd.h?r1=1.59.2.3.2.1r2=1.59.2.3.2.2diff_format=u
 Index: php-src/ext/gd/php_gd.h
 diff -u php-src/ext/gd/php_gd.h:1.59.2.3.2.1 
 php-src/ext/gd/php_gd.h:1.59.2.3.2.2
 --- php-src/ext/gd/php_gd.h:1.59.2.3.2.1  Mon Jan  1 09:36:01 2007
 +++ php-src/ext/gd/php_gd.h   Mon Jan  8 22:52:22 2007
 @@ -17,7 +17,7 @@
 +--+
  */
  
 -/* $Id: php_gd.h,v 1.59.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
 +/* $Id: php_gd.h,v 1.59.2.3.2.2 2007/01/08 22:52:22 nlopess Exp $ */
  
  #ifndef PHP_GD_H
  #define PHP_GD_H
 @@ -66,7 +66,9 @@
  /* gd.c functions */
  PHP_MINFO_FUNCTION(gd);
  PHP_MINIT_FUNCTION(gd);
 +#if HAVE_LIBT1
  PHP_MSHUTDOWN_FUNCTION(gd);
 +#endif
  #if HAVE_LIBGD20  HAVE_GD_STRINGFT
  PHP_RSHUTDOWN_FUNCTION(gd);
  #endif
 
 

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-08 Thread Pierre

Hello,

On 1/8/07, Derick Rethans [EMAIL PROTECTED] wrote:

On Mon, 8 Jan 2007, Nuno Lopes wrote:

 nlopess   Mon Jan  8 22:52:23 2007 UTC

   Modified files:  (Branch: PHP_5_2)
 /php-src/ext/gd   gd.c php_gd.h
   Log:
   avoid calling MSHUTDOWN when built without libt1

Is it really needed to clog the source code with those ifdefs? It's not
like this is a performance issue here...


I agree. There is no issue to fix :)

That being said, I'm not sure such changes are welcome during the RC
phase. Please try to commit such changes after 5.2.1.

--Pierre

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c /ext/gd/libgd gd_png.c /ext/gd/tests bug39780.phpt bug39780.png

2006-12-09 Thread Pierre-Alain Joye
pajoye  Sun Dec 10 01:38:02 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/gd/tests   bug39780.phpt bug39780.png 

  Modified files:  
/php-src/ext/gd gd.c 
/php-src/ext/gd/libgd   gd_png.c 
  Log:
  - MFH:#39780, PNG image with CRC/data error raises fatal error
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.9r2=1.312.2.20.2.10diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.9 php-src/ext/gd/gd.c:1.312.2.20.2.10
--- php-src/ext/gd/gd.c:1.312.2.20.2.9  Fri Nov  3 15:13:17 2006
+++ php-src/ext/gd/gd.c Sun Dec 10 01:38:01 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.9 2006/11/03 15:13:17 bjori Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.10 2006/12/10 01:38:01 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2249,6 +2249,11 @@
im = (*ioctx_func_p)(io_ctx);
if (!im) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Passed data is not 
in '%s' format, tn);
+#if HAVE_LIBGD204
+   io_ctx-gd_free(io_ctx);
+#else
+   io_ctx-free(io_ctx);
+#endif
return NULL;
}
 
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_png.c?r1=1.17.4.2.2.3r2=1.17.4.2.2.4diff_format=u
Index: php-src/ext/gd/libgd/gd_png.c
diff -u php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.3 
php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.4
--- php-src/ext/gd/libgd/gd_png.c:1.17.4.2.2.3  Sun Nov  5 15:04:50 2006
+++ php-src/ext/gd/libgd/gd_png.c   Sun Dec 10 01:38:01 2006
@@ -58,7 +58,7 @@
 * been defined.
 */
 
-   php_gd_error_ex(E_ERROR, gd-png:  fatal libpng error: %s, msg);
+   php_gd_error_ex(E_WARNING, gd-png:  fatal libpng error: %s, msg);
 
jmpbuf_ptr = png_get_error_ptr (png_ptr);
if (jmpbuf_ptr == NULL) { /* we are completely hosed now */
@@ -200,6 +200,23 @@
png_set_packing (png_ptr); /* expand to 1 byte per pixel */
}
 
+   /* setjmp() must be called in every non-callback function that calls a
+* PNG-reading libpng function
+*/
+#ifndef PNG_SETJMP_NOT_SUPPORTED
+   if (setjmp(gdPngJmpbufStruct.jmpbuf)) {
+   php_gd_error(gd-png error: setjmp returns error condition);
+   png_destroy_read_struct(png_ptr, info_ptr, NULL);
+   gdFree(image_data);
+   gdFree(row_pointers);
+   if (im) {
+   gdImageDestroy(im);
+   }
+   return NULL;
+   }
+#endif
+
+
switch (color_type) {
case PNG_COLOR_TYPE_PALETTE:
png_get_PLTE(png_ptr, info_ptr, palette, num_palette);

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39780.phpt?view=markuprev=1.1
Index: php-src/ext/gd/tests/bug39780.phpt
+++ php-src/ext/gd/tests/bug39780.phpt
--TEST--
Bug #39780 (PNG image with CRC/data error raises a fatal error)
--SKIPIF--
?php 
if (!extension_loaded('gd')) die(skip gd extension not available\n); 
if (!GD_BUNDLED) die('skip external GD libraries always fail');
?
--FILE--
?php

$im = imagecreatefrompng(dirname(__FILE__) . '/bug39780.png');
var_dump($im);
?
--EXPECTF--

Warning: imagecreatefrompng(): gd-png:  fatal libpng error: IDAT: CRC error in 
%s on line %d

Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in 
%s on line %d

Warning: imagecreatefrompng(): '%s' is not a valid PNG file in %s on line %d
bool(false)

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c /ext/spl spl_array.c

2006-11-03 Thread Hannes Magnusson
bjori   Fri Nov  3 15:13:17 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
/php-src/ext/splspl_array.c 
  Log:
  MFH: Fix double wrong param count messages
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.8r2=1.312.2.20.2.9diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.8 php-src/ext/gd/gd.c:1.312.2.20.2.9
--- php-src/ext/gd/gd.c:1.312.2.20.2.8  Wed Oct 18 16:04:37 2006
+++ php-src/ext/gd/gd.c Fri Nov  3 15:13:17 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.8 2006/10/18 16:04:37 bjori Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.9 2006/11/03 15:13:17 bjori Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -5057,8 +5057,10 @@
php_image_filter_smooth
};
 
-   if (ZEND_NUM_ARGS()  2 || ZEND_NUM_ARGS()  5 || 
zend_parse_parameters(2 TSRMLS_CC, rl, tmp, filtertype) == FAILURE) {
-   ZEND_WRONG_PARAM_COUNT();
+   if (ZEND_NUM_ARGS()  2 || ZEND_NUM_ARGS()  5) {
+   WRONG_PARAM_COUNT;
+   } else if (zend_parse_parameters(2 TSRMLS_CC, rl, tmp, filtertype) 
== FAILURE) {
+   return;
}
 
if (filtertype = 0  filtertype = IMAGE_FILTER_MAX) {
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.4r2=1.71.2.17.2.5diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.4 
php-src/ext/spl/spl_array.c:1.71.2.17.2.5
--- php-src/ext/spl/spl_array.c:1.71.2.17.2.4   Fri Oct 20 02:11:19 2006
+++ php-src/ext/spl/spl_array.c Fri Nov  3 15:13:17 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.71.2.17.2.4 2006/10/20 02:11:19 pollita Exp $ */
+/* $Id: spl_array.c,v 1.71.2.17.2.5 2006/11/03 15:13:17 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -1022,7 +1022,7 @@
zend_hash_copy(HASH_OF(return_value), spl_array_get_hash_table(intern, 
0 TSRMLS_CC), (copy_ctor_func_t) zval_add_ref, tmp, sizeof(zval*));

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z, array) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   return;
}
if (Z_TYPE_PP(array) == IS_OBJECT  intern == 
(spl_array_object*)zend_object_store_get_object(object TSRMLS_CC)) {
zval_ptr_dtor(intern-array);

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2006-10-18 Thread Hannes Magnusson
bjori   Wed Oct 18 16:04:37 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  MFH: fix arginfo
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.7r2=1.312.2.20.2.8diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.7 php-src/ext/gd/gd.c:1.312.2.20.2.8
--- php-src/ext/gd/gd.c:1.312.2.20.2.7  Sat Oct  7 16:40:39 2006
+++ php-src/ext/gd/gd.c Wed Oct 18 16:04:37 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.7 2006/10/07 16:40:39 pollita Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.8 2006/10/18 16:04:37 bjori Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -439,16 +439,15 @@
 
 #ifdef HAVE_GD_PNG
 static
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imagepng, 0, 0, 2)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imagepng, 0, 0, 1)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, filename)
-   ZEND_ARG_INFO(0, quality)
 ZEND_END_ARG_INFO()
 #endif
 
 #ifdef HAVE_GD_JPG
 static
-ZEND_BEGIN_ARG_INFO_EX(arginfo_imagejpeg, 0, 0, 2)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imagejpeg, 0, 0, 1)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(0, quality)

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c

2006-09-28 Thread Ilia Alshanetsky
iliaa   Thu Sep 28 23:17:31 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
  Log:
  Fixed a large leak inside _php_image_create_from()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.5r2=1.312.2.20.2.6diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.5 php-src/ext/gd/gd.c:1.312.2.20.2.6
--- php-src/ext/gd/gd.c:1.312.2.20.2.5  Tue Aug  8 11:56:36 2006
+++ php-src/ext/gd/gd.c Thu Sep 28 23:17:31 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.5 2006/08/08 11:56:36 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.6 2006/09/28 23:17:31 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2406,6 +2406,7 @@
 
io_ctx = gdNewDynamicCtxEx(buff_size, buff, 0);
if (!io_ctx) {
+   pefree(buff, 1);
php_error_docref(NULL TSRMLS_CC, E_WARNING,Cannot 
allocate GD IO context);
goto out_err;
}
@@ -2420,7 +2421,7 @@
 #else
io_ctx-free(io_ctx);
 #endif
-
+   pefree(buff, 1);
 #endif
}
else {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c /ext/gd/libgd gd_gd2.c

2006-08-08 Thread Pierre-Alain Joye
pajoye  Tue Aug  8 11:56:36 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c 
/php-src/ext/gd/libgd   gd_gd2.c 
  Log:
  - fix compiler warnings
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.4r2=1.312.2.20.2.5diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.4 php-src/ext/gd/gd.c:1.312.2.20.2.5
--- php-src/ext/gd/gd.c:1.312.2.20.2.4  Tue Aug  1 22:42:11 2006
+++ php-src/ext/gd/gd.c Tue Aug  8 11:56:36 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.4 2006/08/01 22:42:11 tony2001 Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.5 2006/08/08 11:56:36 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -3677,7 +3677,7 @@
ch = (int)((unsigned char)*(Z_STRVAL_PP(C)));
} else {
str = (unsigned char *) estrndup(Z_STRVAL_PP(C), 
Z_STRLEN_PP(C));
-   l = strlen(str);
+   l = strlen((char *)str);
}
 
y = Z_LVAL_PP(Y);
@@ -4044,7 +4044,7 @@
{
char tmp_font_path[MAXPATHLEN];
 
-   if (VCWD_REALPATH(fontname, tmp_font_path)) {
+   if (VCWD_REALPATH((char *)fontname, tmp_font_path)) {
fontname = (unsigned char *) fontname;
} else {
fontname = NULL;
@@ -4054,18 +4054,18 @@
fontname = (unsigned char *) fontname;
 #endif
 
-   PHP_GD_CHECK_OPEN_BASEDIR(fontname, Invalid font filename);
+   PHP_GD_CHECK_OPEN_BASEDIR((char *)fontname, Invalid font filename);

 #ifdef USE_GD_IMGSTRTTF
 # if HAVE_GD_STRINGFTEX
if (extended) {
-   error = gdImageStringFTEx(im, brect, col, fontname, ptsize, 
angle, x, y, str, strex);
+   error = gdImageStringFTEx(im, brect, col, (char *)fontname, 
ptsize, angle, x, y, (char *)str, strex);
}
else
 # endif
 
 # if HAVE_GD_STRINGFT
-   error = gdImageStringFT(im, brect, col, fontname, ptsize, angle, x, y, 
str);
+   error = gdImageStringFT(im, brect, col, (char *)fontname, ptsize, 
angle, x, y, (char *)str);
 # elif HAVE_GD_STRINGTTF
error = gdImageStringTTF(im, brect, col, fontname, ptsize, angle, x, y, 
str);
 # endif
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gd2.c?r1=1.16.4.1.2.1r2=1.16.4.1.2.2diff_format=u
Index: php-src/ext/gd/libgd/gd_gd2.c
diff -u php-src/ext/gd/libgd/gd_gd2.c:1.16.4.1.2.1 
php-src/ext/gd/libgd/gd_gd2.c:1.16.4.1.2.2
--- php-src/ext/gd/libgd/gd_gd2.c:1.16.4.1.2.1  Wed Jul 26 08:53:30 2006
+++ php-src/ext/gd/libgd/gd_gd2.c   Tue Aug  8 11:56:36 2006
@@ -544,7 +544,7 @@
chunkNum = cx + cy * ncx;
 
chunkLen = chunkMax;
-   if (!_gd2ReadChunk (chunkIdx[chunkNum].offset, 
compBuf, chunkIdx[chunkNum].size, chunkBuf, chunkLen, in)) {
+   if (!_gd2ReadChunk (chunkIdx[chunkNum].offset, 
compBuf, chunkIdx[chunkNum].size, (char *)chunkBuf, chunkLen, in)) {
php_gd_error(Error reading comproessed 
chunk);
goto fail2;
}
@@ -558,7 +558,7 @@
for (x = xlo; x  xhi; x++) {
if (!gd2_compressed(fmt)) {
if (im-trueColor) {
-   if (!gdGetInt(ch, in)) 
{
+   if (!gdGetInt((int 
*)ch, in)) {
ch = 0;
}
} else {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c gd_ctx.c

2006-08-01 Thread Antony Dovgal
tony2001Tue Aug  1 22:42:11 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c gd_ctx.c 
  Log:
  MFH: implement my own FR #36995
  add missing ifdefs
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.3r2=1.312.2.20.2.4diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.3 php-src/ext/gd/gd.c:1.312.2.20.2.4
--- php-src/ext/gd/gd.c:1.312.2.20.2.3  Sun Jul  2 00:11:06 2006
+++ php-src/ext/gd/gd.c Tue Aug  1 22:42:11 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.3 2006/07/02 00:11:06 bjori Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.4 2006/08/01 22:42:11 tony2001 Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2357,8 +2357,9 @@
php_stream *stream;
FILE * fp = NULL;
int argc=ZEND_NUM_ARGS();
+#ifdef HAVE_GD_JPG
long ignore_warning;
-
+#endif
 
if ((image_type == PHP_GDIMG_TYPE_GD2PART  argc != 5) ||
(image_type != PHP_GDIMG_TYPE_GD2PART  argc != 1) ||
@@ -4672,7 +4673,9 @@
int int_threshold;
int x, y;
float x_ratio, y_ratio;
+#ifdef HAVE_GD_JPG
 long ignore_warning;
+#endif

if (argc != 5 || zend_get_parameters_ex(argc, f_org, f_dest, height, 
width, threshold) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd_ctx.c?r1=1.22.2.5r2=1.22.2.5.2.1diff_format=u
Index: php-src/ext/gd/gd_ctx.c
diff -u php-src/ext/gd/gd_ctx.c:1.22.2.5 php-src/ext/gd/gd_ctx.c:1.22.2.5.2.1
--- php-src/ext/gd/gd_ctx.c:1.22.2.5Fri Jan 27 13:36:29 2006
+++ php-src/ext/gd/gd_ctx.c Tue Aug  1 22:42:11 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: gd_ctx.c,v 1.22.2.5 2006/01/27 13:36:29 pajoye Exp $ */
+/* $Id: gd_ctx.c,v 1.22.2.5.2.1 2006/08/01 22:42:11 tony2001 Exp $ */
 
 #include php_gd.h
 
@@ -93,7 +93,7 @@
 
fp = VCWD_FOPEN(fn, wb);
if (!fp) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to 
open '%s' for writing, fn);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to 
open '%s' for writing: %s, fn, strerror(errno));
RETURN_FALSE;
}
 

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