sesser Tue Mar 1 08:53:03 2005 EDT
Modified files:
/php-src/ext/standard image.c
Log:
Handle last or broken JP2 boxes correctly.
http://cvs.php.net/diff.php/php-src/ext/standard/image.c?r1=1.109&r2=1.110&ty=u
Index: php-src/ext/standard/image.c
diff -u php-src/ext/standard/image.c:1.109 php-src/ext/standard/image.c:1.110
--- php-src/ext/standard/image.c:1.109 Tue Mar 1 05:14:18 2005
+++ php-src/ext/standard/image.c Tue Mar 1 08:53:02 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.109 2005/03/01 10:14:18 helly Exp $ */
+/* $Id: image.c,v 1.110 2005/03/01 13:53:02 sesser Exp $ */
#include "php.h"
#include <stdio.h>
@@ -708,6 +708,11 @@
break;
}
+ /* Stop if this was the last box */
+ if ((int)box_length <= 0) {
+ break;
+ }
+
/* Skip over LBox (Which includes both TBox and LBox itself */
if (php_stream_seek(stream, box_length - 8, SEEK_CUR)) {
break;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php