source: src/router/php7/ext/gd/tests/bug66339-mb.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 4 months ago

update php

File size: 901 bytes
Line 
1--TEST--
2Bug #66339 (PHP segfaults in imagexbm)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6?>
7--FILE--
8<?php
9$im = imagecreate(8, 8);
10imagecolorallocate($im, 0, 0, 0); // background
11$white = imagecolorallocate($im, 255, 255, 255);
12imagefilledrectangle($im, 2, 2, 6, 6, $white);
13imagexbm($im, NULL);
14echo "------------\n";
15imagexbm($im, './bug66339私はガラスを食べられたす.xbm');
16echo file_get_contents('./bug66339私はガラスを食べられたす.xbm');
17?>
18--CLEAN--
19<?php
20unlink('./bug66339私はガラスを食べられたす.xbm');
21?>
22--EXPECTF--
23#define image_width 8
24#define image_height 8
25static unsigned char image_bits[] = {
26  0xFF, 0xFF, 0x83, 0x83, 0x83, 0x83, 0x83, 0xFF};
27------------
28#define bug66339%swidth 8
29#define bug66339%sheight 8
30static unsigned char bug66339%sbits[] = {
31  0xFF, 0xFF, 0x83, 0x83, 0x83, 0x83, 0x83, 0xFF};
Note: See TracBrowser for help on using the repository browser.