mydata = ecalloc(1, sizeof(phar_archive_data));
mydata->fname = expand_filepath(fname, NULL);
if (mydata->fname == NULL) {
+ efree(mydata);
return FAILURE;
}
fname_len = strlen(mydata->fname);
--FILE--
<?php
$path = '../' . str_repeat("x", PHP_MAXPATHLEN) . '.tar';
-$phar = new PharData($path);
+try {
+ $phar = new PharData($path);
+} catch (UnexpectedValueException $e) {
+ echo $e->getMessage(), "\n";
+}
?>
---EXPECTF--
-Fatal error: Uncaught UnexpectedValueException: Phar creation or opening failed in %s%ebug77396.php:%d
-Stack trace:
-#0 %s%ebug77396.php(%d): PharData->__construct(%s)
-#1 {main}
- thrown in %s%ebug77396.php on line %d
+--EXPECT--
+Phar creation or opening failed