- Fixed size calculation in chunk_split() (Stas)
- Fixed integer overlow in str[c]spn() (Stas)
- Fixed UMR in money_format() (Stas, Ilia)
+- Added missing format validator to unpack() function (Ilia)
- Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory
already exists). (Pierre)
- Fixed bug #41608 (segfault on a weird code with objects and switch()).
case 'd':
size = sizeof(double);
break;
+
+ default:
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid format type %c", type);
+ zval_dtor(return_value);
+ RETURN_FALSE;
+ break;
}
/* Do actual unpacking */
--- /dev/null
+--TEST--
+Invalid format type validation
+--FILE--
+<?php
+ var_dump(unpack("-2222", 1));
+ echo "Done\n";
+?>
+--EXPECTF--
+Warning: unpack(): Invalid format type - in %s/unpack.php on line %d
+bool(false)
+Done
\ No newline at end of file