diff options
author | Christoph M. Becker <cmb@php.net> | 2015-07-13 22:39:12 +0200 |
---|---|---|
committer | Christoph M. Becker <cmb@php.net> | 2015-07-13 22:39:12 +0200 |
commit | cdf4d35e30709ec30a857b218d2669c98ffe1d25 (patch) | |
tree | ef9ddd2f7465817e305b7a3c95165c63fa27ebc5 | |
parent | 36439cf7b8b00249f8f90be9dabe1e24bbadf7a1 (diff) | |
parent | e9eee7684068252f6cdea8b0aa9ab9f37e04c617 (diff) | |
download | php-git-cdf4d35e30709ec30a857b218d2669c98ffe1d25.tar.gz |
Merge branch 'master' of http://git.php.net/repository/php-src
# By Christoph M. Becker (6) and others
* 'master' of http://git.php.net/repository/php-src:
updated NEWS
updated NEWS
Fix #66882: imagerotate by -90 degrees truncates image by 1px
update NEWS
Fixed bug #70065 curl_getinfo() returns corrupted values
Revert SplFileInfo BC break while keeping fix for assertion removal
Fix issue with SplFileInfo::getExtension() on files with only a leading '.' character
updated NEWS
updated NEWS
Fix #70064: imagescale(..., IMG_BICUBIC) leaks memory
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | ext/curl/interface.c | 7 | ||||
-rw-r--r-- | ext/gd/libgd/gd_interpolation.c | 4 | ||||
-rw-r--r-- | ext/spl/spl_directory.c | 1 | ||||
-rw-r--r-- | ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt | 13 |
5 files changed, 27 insertions, 3 deletions
@@ -9,7 +9,12 @@ . Fixed bug #69996 (Changing the property of a cloned object affects the original). (Dmitry, Laruence) +- Curl: + . Fixed bug #70065 (curl_getinfo() returns corrupted values). (Anatol) + - GD: + . Fixed bug #66882 (imagerotate by -90 degrees truncates image by 1px). (cmb) + . Fixed bug #70064 (imagescale(..., IMG_BICUBIC) leaks memory). (cmb) . Fixed bug #69024 (imagescale segfault with palette based image). (cmb) . Fixed bug #53154 (Zero-height rectangle has whiskers). (cmb) . Fixed bug #67447 (imagecrop() add a black line when cropping). (cmb) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 676c6adb81..f45d9d1d64 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2904,7 +2904,14 @@ PHP_FUNCTION(curl_getinfo) if (ZEND_NUM_ARGS() < 2) { char *s_code; +#ifdef PHP_WIN32 + /* libcurl currently relies on 32-bit long directly. + We should use zend_long here once libcurl has full + 64-bit support on Windows. */ + long l_code; +#else zend_long l_code; +#endif double d_code; #if LIBCURL_VERSION_NUM > 0x071301 struct curl_certinfo *ci = NULL; diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 94c4968d29..f70169dddc 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -1073,12 +1073,12 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_widt dst = gdImageCreateTrueColor(new_width, new_height); if (dst == NULL) { - gdFree(tmp_im); + gdImageDestroy(tmp_im); return NULL; } gdImageSetInterpolationMethod(dst, src->interpolation_id); _gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height); - gdFree(tmp_im); + gdImageDestroy(tmp_im); return dst; } diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index bf23c644c9..eaaf609501 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -940,7 +940,6 @@ SPL_METHOD(SplFileInfo, getExtension) p = zend_memrchr(ZSTR_VAL(ret), '.', ZSTR_LEN(ret)); if (p) { - assert(p > ZSTR_VAL(ret)); idx = (int)(p - ZSTR_VAL(ret)); RETVAL_STRINGL(ZSTR_VAL(ret) + idx + 1, ZSTR_LEN(ret) - idx - 1); zend_string_release(ret); diff --git a/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt b/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt new file mode 100644 index 0000000000..7b2be18900 --- /dev/null +++ b/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt @@ -0,0 +1,13 @@ +--TEST-- +SPL: Spl File Info test getExtension with leading dot +--FILE-- +<?php +$file = __DIR__ . '/.test'; +touch($file); +$fileInfo = new SplFileInfo($file); + +var_dump($fileInfo->getExtension()); +unlink($file); +?> +--EXPECT-- +string(4) "test" |