[PHP-CVS] com php-src: Merge branch 'PHP-5.5': php.ini-development php.ini-production

2013-10-23 Thread Christopher Jones
Commit:b3a2b44198f160aa829c0079012dd8a029fe5f6d
Author:Christopher Jones s...@php.net Mon, 21 Oct 2013 14:21:19 
-0700
Parents:   d15cedfba9bfa99bf4d4f55ebf67ef49adf1d15b 
b6ceea4a25f667bfed6c26899dd55a274a3270d3
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b3a2b44198f160aa829c0079012dd8a029fe5f6d

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  Fixed bug #65939 (Space before ; breaks php.ini parsing). (brainstorm at 
nopcode dot org)

Bugs:
https://bugs.php.net/65939

Changed paths:
  MM  php.ini-development
  MM  php.ini-production


Diff:



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



[PHP-CVS] com php-src: Fixed bug #65939 (Space before ; breaks php.ini parsing). (brainstorm at nopcode dot org): NEWS php.ini-development php.ini-production

2013-10-23 Thread Christopher Jones
Commit:b6ceea4a25f667bfed6c26899dd55a274a3270d3
Author:Christopher Jones s...@php.net Mon, 21 Oct 2013 14:20:35 
-0700
Parents:   ee7cfa022dcec6cf5ce0714de3f34c90681962b6
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b6ceea4a25f667bfed6c26899dd55a274a3270d3

Log:
Fixed bug #65939 (Space before ; breaks php.ini parsing). (brainstorm at 
nopcode dot org)

Bugs:
https://bugs.php.net/65939

Changed paths:
  M  NEWS
  M  php.ini-development
  M  php.ini-production


Diff:
diff --git a/NEWS b/NEWS
index 69b1658..b51b8b2 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP 
   NEWS
 ?? ??? 2013, PHP 5.5.6
 
 - Core:
+  . Fixed bug #65939 (Space before ; breaks php.ini parsing).
+(brainstorm at nopcode dot org)
   . Fixed bug #65911 (scope resolution operator - strange behavior with $this).
 (Bob Weinand)
 
diff --git a/php.ini-development b/php.ini-development
index 630f9e9..2ef47a4 100644
--- a/php.ini-development
+++ b/php.ini-development
@@ -1907,7 +1907,7 @@ ldap.max_links = -1
 ;opcache.revalidate_path=0
 
 ; If disabled, all PHPDoc comments are dropped from the code to reduce the
- ;size of the optimized code.
+; size of the optimized code.
 ;opcache.save_comments=1
 
 ; If disabled, PHPDoc comments are not loaded from SHM, so Doc Comments
diff --git a/php.ini-production b/php.ini-production
index ba30f90..c39de74 100644
--- a/php.ini-production
+++ b/php.ini-production
@@ -1907,7 +1907,7 @@ ldap.max_links = -1
 ;opcache.revalidate_path=0
 
 ; If disabled, all PHPDoc comments are dropped from the code to reduce the
- ;size of the optimized code.
+; size of the optimized code.
 ;opcache.save_comments=1
 
 ; If disabled, PHPDoc comments are not loaded from SHM, so Doc Comments


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



[PHP-CVS] com php-src: Merged PR #293 (Exif crash on unknown encoding was fixed) By: Draal Conflicts: configure.in main/php_version.h: ext/exif/exif.c ext/exif/tests/exif_encoding_crash.jpg ext/exi

2013-10-23 Thread Michael Wallner
Commit:1b43f9504020a1fa607eb58b81defaba9d8cfd6b
Author:Michael Wallner m...@php.net Mon, 21 Oct 2013 21:48:27 
+0200
Parents:   2ecf94e07efae6059e40069a7c1a895514c24466
Branches:  PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1b43f9504020a1fa607eb58b81defaba9d8cfd6b

Log:
Merged PR #293 (Exif crash on unknown encoding was fixed)
By:
Draal
Conflicts:
configure.in
main/php_version.h

Bugs:
https://bugs.php.net/293

Changed paths:
  M  ext/exif/exif.c
  A  ext/exif/tests/exif_encoding_crash.jpg
  A  ext/exif/tests/exif_encoding_crash.phpt


Diff:
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index bd646d9..2fe54f7 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -2643,6 +2643,7 @@ static int exif_process_user_comment(image_info_type 
*ImageInfo, char **pszInfoP
} else {
decode = ImageInfo-decode_unicode_le;
}
+   /* XXX this will fail again if encoding_converter 
returns on error something different than SIZE_MAX   */
if (zend_multibyte_encoding_converter(
(unsigned char**)pszInfoPtr, 
len, 
@@ -2650,7 +2651,7 @@ static int exif_process_user_comment(image_info_type 
*ImageInfo, char **pszInfoP
ByteCount,

zend_multibyte_fetch_encoding(ImageInfo-encode_unicode TSRMLS_CC),
zend_multibyte_fetch_encoding(decode 
TSRMLS_CC)
-   TSRMLS_CC)  0) {
+   TSRMLS_CC) == (size_t)-1) {
len = exif_process_string_raw(pszInfoPtr, 
szValuePtr, ByteCount);
}
return len;
@@ -2663,6 +2664,7 @@ static int exif_process_user_comment(image_info_type 
*ImageInfo, char **pszInfoP
*pszEncoding = estrdup((const char*)szValuePtr);
szValuePtr = szValuePtr+8;
ByteCount -= 8;
+   /* XXX this will fail again if encoding_converter 
returns on error something different than SIZE_MAX   */
if (zend_multibyte_encoding_converter(
(unsigned char**)pszInfoPtr, 
len, 
@@ -2670,7 +2672,7 @@ static int exif_process_user_comment(image_info_type 
*ImageInfo, char **pszInfoP
ByteCount,

zend_multibyte_fetch_encoding(ImageInfo-encode_jis TSRMLS_CC),

zend_multibyte_fetch_encoding(ImageInfo-motorola_intel ? 
ImageInfo-decode_jis_be : ImageInfo-decode_jis_le TSRMLS_CC)
-   TSRMLS_CC)  0) {
+   TSRMLS_CC) == (size_t)-1) {
len = exif_process_string_raw(pszInfoPtr, 
szValuePtr, ByteCount);
}
return len;
@@ -2700,8 +2702,8 @@ static int exif_process_user_comment(image_info_type 
*ImageInfo, char **pszInfoP
 static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type 
*xp_field, int tag, char *szValuePtr, int ByteCount TSRMLS_DC)
 {
xp_field-tag = tag;
-
-   /* Copy the comment */
+   
+   /* XXX this will fail again if encoding_converter returns on error 
something different than SIZE_MAX   */
if (zend_multibyte_encoding_converter(
(unsigned char**)xp_field-value, 
xp_field-size, 
@@ -2709,7 +2711,7 @@ static int exif_process_unicode(image_info_type 
*ImageInfo, xp_field_type *xp_fi
ByteCount,
zend_multibyte_fetch_encoding(ImageInfo-encode_unicode 
TSRMLS_CC),
zend_multibyte_fetch_encoding(ImageInfo-motorola_intel 
? ImageInfo-decode_unicode_be : ImageInfo-decode_unicode_le TSRMLS_CC)
-   TSRMLS_CC)  0) {
+   TSRMLS_CC) == (size_t)-1) {
xp_field-size = exif_process_string_raw(xp_field-value, 
szValuePtr, ByteCount);
}
return xp_field-size;
diff --git a/ext/exif/tests/exif_encoding_crash.jpg 
b/ext/exif/tests/exif_encoding_crash.jpg
new file mode 100644
index 000..55138ab
Binary files /dev/null and b/ext/exif/tests/exif_encoding_crash.jpg differ
diff --git a/ext/exif/tests/exif_encoding_crash.phpt 
b/ext/exif/tests/exif_encoding_crash.phpt
new file mode 100644
index 000..1c4ad63
--- /dev/null
+++ b/ext/exif/tests/exif_encoding_crash.phpt
@@ -0,0 +1,14 @@
+--TEST--
+PHP crash when zend_multibyte_encoding_converter returns (size_t)-1)
+--SKIPIF--
+?php if (!extension_loaded('exif')) print 'skip exif extension not