mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 11:10:49 +00:00
Compare commits
7
Commits
php-7.0.1
...
php-5.5.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3156580a34 | ||
|
|
eb63f8c2a6 | ||
|
|
0880851f00 | ||
|
|
53c6b594f5 | ||
|
|
1677be7a30 | ||
|
|
61bcea7019 | ||
|
|
46996a68a3 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2014, PHP 5.5.10
|
||||
06 Mar 2014, PHP 5.5.10
|
||||
|
||||
- Core:
|
||||
. Fixed Request #66574i (Allow multiple paths in php_ini_scanned_path). (Remi)
|
||||
@@ -10,7 +10,12 @@ PHP NEWS
|
||||
per offset too). (Derick)
|
||||
|
||||
- Fileinfo:
|
||||
. Bug #66731 (file: infinite recursion). (Remi)
|
||||
. Fixed bug #66731 (file: infinite recursion) (CVE-2014-1943). (Remi)
|
||||
. Fixed bug #66820 (out-of-bounds memory access in fileinfo). (Remi)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #66815 (imagecrop(): insufficient fix for NULL defer
|
||||
CVE-2013-7327). (Tomas Hoger, Remi)
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #65753 (JsonSerializeable couldn't implement on module extension)
|
||||
|
||||
+2
-2
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=5
|
||||
PHP_RELEASE_VERSION=9
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=10
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ private void cvt_16(union VALUETYPE *, const struct magic *);
|
||||
private void cvt_32(union VALUETYPE *, const struct magic *);
|
||||
private void cvt_64(union VALUETYPE *, const struct magic *);
|
||||
|
||||
#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
|
||||
|
||||
/*
|
||||
* softmagic - lookup one file in parsed, in-memory copy of database
|
||||
* Passed the name and FILE * of one file to be typed.
|
||||
@@ -1171,7 +1173,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
}
|
||||
switch (cvt_flip(m->in_type, flip)) {
|
||||
case FILE_BYTE:
|
||||
if (nbytes < (offset + 1))
|
||||
if (OFFSET_OOB(nbytes, offset, 1))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1206,7 +1208,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_BESHORT:
|
||||
if (nbytes < (offset + 2))
|
||||
if (OFFSET_OOB(nbytes, offset, 2))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1258,7 +1260,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_LESHORT:
|
||||
if (nbytes < (offset + 2))
|
||||
if (OFFSET_OOB(nbytes, offset, 2))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1310,7 +1312,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_SHORT:
|
||||
if (nbytes < (offset + 2))
|
||||
if (OFFSET_OOB(nbytes, offset, 2))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1347,7 +1349,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
break;
|
||||
case FILE_BELONG:
|
||||
case FILE_BEID3:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1418,7 +1420,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
break;
|
||||
case FILE_LELONG:
|
||||
case FILE_LEID3:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1488,7 +1490,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_MELONG:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1558,7 +1560,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_LONG:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1630,14 +1632,14 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
/* Verify we have enough data to match magic type */
|
||||
switch (m->type) {
|
||||
case FILE_BYTE:
|
||||
if (nbytes < (offset + 1)) /* should always be true */
|
||||
if (OFFSET_OOB(nbytes, offset, 1))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case FILE_SHORT:
|
||||
case FILE_BESHORT:
|
||||
case FILE_LESHORT:
|
||||
if (nbytes < (offset + 2))
|
||||
if (OFFSET_OOB(nbytes, offset, 2))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
@@ -1656,33 +1658,33 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
case FILE_FLOAT:
|
||||
case FILE_BEFLOAT:
|
||||
case FILE_LEFLOAT:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case FILE_DOUBLE:
|
||||
case FILE_BEDOUBLE:
|
||||
case FILE_LEDOUBLE:
|
||||
if (nbytes < (offset + 8))
|
||||
if (OFFSET_OOB(nbytes, offset, 8))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case FILE_STRING:
|
||||
case FILE_PSTRING:
|
||||
case FILE_SEARCH:
|
||||
if (nbytes < (offset + m->vallen))
|
||||
if (OFFSET_OOB(nbytes, offset, m->vallen))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case FILE_REGEX:
|
||||
if (nbytes < offset)
|
||||
if (OFFSET_OOB(nbytes, offset, 0))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case FILE_INDIRECT:
|
||||
if (offset == 0)
|
||||
return 0;
|
||||
if (nbytes < offset)
|
||||
if (OFFSET_OOB(nbytes, offset, 0))
|
||||
return 0;
|
||||
sbuf = ms->o.buf;
|
||||
soffset = ms->offset;
|
||||
@@ -1696,17 +1698,27 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
ms->o.buf = sbuf;
|
||||
ms->offset = soffset;
|
||||
if (rv == 1) {
|
||||
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
|
||||
file_printf(ms, m->desc, offset) == -1)
|
||||
return -1;
|
||||
if (file_printf(ms, "%s", rbuf) == -1)
|
||||
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
|
||||
file_printf(ms, m->desc, offset) == -1) {
|
||||
if (rbuf) {
|
||||
efree(rbuf);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (file_printf(ms, "%s", rbuf) == -1) {
|
||||
if (rbuf) {
|
||||
efree(rbuf);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (rbuf) {
|
||||
efree(rbuf);
|
||||
}
|
||||
return rv;
|
||||
|
||||
case FILE_USE:
|
||||
if (nbytes < offset)
|
||||
if (OFFSET_OOB(nbytes, offset, 0))
|
||||
return 0;
|
||||
sbuf = m->value.s;
|
||||
if (*sbuf == '^') {
|
||||
|
||||
@@ -45,22 +45,20 @@ gdImagePtr gdImageCrop(gdImagePtr src, const gdRectPtr crop)
|
||||
gdImagePtr dst;
|
||||
int y;
|
||||
|
||||
/* check size */
|
||||
if (crop->width<=0 || crop->height<=0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* allocate the requested size (could be only partially filled) */
|
||||
if (src->trueColor) {
|
||||
dst = gdImageCreateTrueColor(crop->width, crop->height);
|
||||
if (dst == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
gdImageSaveAlpha(dst, 1);
|
||||
} else {
|
||||
dst = gdImageCreate(crop->width, crop->height);
|
||||
if (dst == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
gdImagePaletteCopy(dst, src);
|
||||
}
|
||||
if (dst == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
dst->transparent = src->transparent;
|
||||
|
||||
/* check position in the src image */
|
||||
|
||||
@@ -24,6 +24,8 @@ var_dump(imagecrop($img, array("x" => -20, "y" => -20, "width" => 10, "height" =
|
||||
// POC #4
|
||||
var_dump(imagecrop($img, array("x" => 0x7fffff00, "y" => 0, "width" => 10, "height" => 10)));
|
||||
|
||||
// bug 66815
|
||||
var_dump(imagecrop($img, array("x" => 0, "y" => 0, "width" => 65535, "height" => 65535)));
|
||||
?>
|
||||
--EXPECTF--
|
||||
resource(%d) of type (gd)
|
||||
@@ -35,6 +37,13 @@ Array
|
||||
[width] => 10
|
||||
[height] => 10
|
||||
)
|
||||
|
||||
Warning: imagecrop(): gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
|
||||
in %sbug66356.php on line %d
|
||||
bool(false)
|
||||
resource(%d) of type (gd)
|
||||
resource(%d) of type (gd)
|
||||
resource(%d) of type (gd)
|
||||
|
||||
Warning: imagecrop(): gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
|
||||
in %sbug66356.php on line %d
|
||||
bool(false)
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
/* edit configure.in to change version number */
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 5
|
||||
#define PHP_RELEASE_VERSION 9
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "5.5.9-dev"
|
||||
#define PHP_VERSION_ID 50509
|
||||
#define PHP_RELEASE_VERSION 10
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "5.5.10"
|
||||
#define PHP_VERSION_ID 50510
|
||||
Reference in new issue
Block a user