com php-src: add tests for bug #62523: ext/exif/tests/bug62 523_1.jpg ext/exif/tests/bug62523_1 .phpt ext/exif/tests/bug62523_2.jpg ext/e
xif/tests/bug62523_2.phpt ext/exif/tests/bug 62523_3.jpg ext/exif/tests/bug62523 _3.phpt

From: Date: Mon, 21 Oct 2013 20:15:09 +0000
Subject: com php-src: add tests for bug #62523: ext/exif/tests/bug62 523_1.jpg ext/exif/tests/bug62523_1 .phpt ext/exif/tests/bug62523_2.jpg ext/e
xif/tests/bug62523_2.phpt ext/exif/tests/bug 62523_3.jpg ext/exif/tests/bug62523 _3.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73779@lists.php.net to get a copy of this message
Commit: 2fa5f39e4c489495b886214aa788d0fbffe06446 Author: Michael Wallner <mike@php.net> Mon, 21 Oct 2013 22:15:09 +0200 Parents: 1b43f9504020a1fa607eb58b81defaba9d8cfd6b Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2fa5f39e4c489495b886214aa788d0fbffe06446 Log: add tests for bug #62523 Bugs: https://bugs.php.net/62523 Changed paths: A ext/exif/tests/bug62523_1.jpg A ext/exif/tests/bug62523_1.phpt A ext/exif/tests/bug62523_2.jpg A ext/exif/tests/bug62523_2.phpt A ext/exif/tests/bug62523_3.jpg A ext/exif/tests/bug62523_3.phpt Diff: diff --git a/ext/exif/tests/bug62523_1.jpg b/ext/exif/tests/bug62523_1.jpg new file mode 100644 index 0000000..9a63d1e --- /dev/null +++ b/ext/exif/tests/bug62523_1.jpg @@ -0,0 +1,9 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> +<html><head> +<title>301 Moved Permanently</title> +</head><body> +<h1>Moved Permanently</h1> +<p>The document has moved <a href="http://www.getid3.org/temp/62523.jpg">here</a>.</p> +<hr> +<address>Apache Server at getid3.org Port 80</address> +</body></html> diff --git a/ext/exif/tests/bug62523_1.phpt b/ext/exif/tests/bug62523_1.phpt new file mode 100644 index 0000000..28d42f0 --- /dev/null +++ b/ext/exif/tests/bug62523_1.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug 62523 (php crashes with segfault when exif_read_data called) +--SKIPIF-- +<?php +extension_loaded("exif") or die("skip need exif"); +?> +--FILE-- +<?php +echo "Test\n"; +var_dump(count(exif_read_data(__DIR__."/bug62523_1.jpg"))); +?> +Done +--EXPECTF-- +Test + +Warning: exif_read_data(bug62523_1.jpg): File not supported in %sbug62523_1.php on line %d +int(1) +Done diff --git a/ext/exif/tests/bug62523_2.jpg b/ext/exif/tests/bug62523_2.jpg new file mode 100644 index 0000000..8d7fc6c Binary files /dev/null and b/ext/exif/tests/bug62523_2.jpg differ diff --git a/ext/exif/tests/bug62523_2.phpt b/ext/exif/tests/bug62523_2.phpt new file mode 100644 index 0000000..ddc8ae8 --- /dev/null +++ b/ext/exif/tests/bug62523_2.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug 62523 (php crashes with segfault when exif_read_data called) +--SKIPIF-- +<?php +extension_loaded("exif") or die("skip need exif"); +?> +--FILE-- +<?php +echo "Test\n"; +var_dump(count(exif_read_data(__DIR__."/bug62523_2.jpg"))); +?> +Done +--EXPECT-- +Test +int(76) +Done diff --git a/ext/exif/tests/bug62523_3.jpg b/ext/exif/tests/bug62523_3.jpg new file mode 100644 index 0000000..3ee9136 --- /dev/null +++ b/ext/exif/tests/bug62523_3.jpg @@ -0,0 +1,12 @@ +<html> + <head><title>Found</title></head> + <body> + <h1>Found</h1> + <p>The resource was found at <a href="http://dl.dropboxusercontent.com/u/7562584/Bugs/Php/bad_exif.jpeg">http://dl.dropboxusercontent.com/u/7562584/Bugs/Php/bad_exif.jpeg</a>; +you should be redirected automatically. + +<!-- --></p> + <hr noshade> + <div align="right">WSGI Server</div> + </body> +</html> diff --git a/ext/exif/tests/bug62523_3.phpt b/ext/exif/tests/bug62523_3.phpt new file mode 100644 index 0000000..6e11354 --- /dev/null +++ b/ext/exif/tests/bug62523_3.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug 62523 (php crashes with segfault when exif_read_data called) +--SKIPIF-- +<?php +extension_loaded("exif") or die("skip need exif"); +?> +--FILE-- +<?php +echo "Test\n"; +var_dump(count(exif_read_data(__DIR__."/bug62523_3.jpg"))); +?> +Done +--EXPECTF-- +Test + +Warning: exif_read_data(bug62523_3.jpg): File not supported in %sbug62523_3.php on line %d +int(1) +Done

« previous php.cvs (#73779) next »