xref: /PHP-5.5/ext/gd/tests/bug71912.phpt (revision b15f0ecc)
1--TEST--
2Bug #71912 (libgd: signedness vulnerability)
3--SKIPIF--
4<?php
5        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
6        if(!function_exists('imagecreatefromgd2')) die('skip imagecreatefromgd2() not available');
7?>
8--FILE--
9<?php
10imagecreatefromgd2(__DIR__."/invalid_neg_size.gd2");
11?>
12OK
13--EXPECTF--
14
15Warning: imagecreatefromgd2(): '%s/invalid_neg_size.gd2' is not a valid GD2 file in %s/bug71912.php on line %d
16OK