Skip to content

Commit 25ef19f

Browse files
committed
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: fix/improve tests
2 parents 4bc97db + a21a997 commit 25ef19f

File tree

4 files changed

+52
-29
lines changed

4 files changed

+52
-29
lines changed

Diff for: ext/bcmath/tests/bug72093-win32.phpt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
3+
--SKIPIF--
4+
<?php
5+
if(!extension_loaded("bcmath")) print "skip";
6+
if (substr(PHP_OS, 0, 3) != 'WIN') {
7+
die('skip valid only for windows');
8+
}
9+
?>
10+
--FILE--
11+
<?php
12+
var_dump(bcpowmod(1, "A", 128, -200));
13+
var_dump(bcpowmod(1, 1.2, 1, 1));
14+
?>
15+
--EXPECTF--
16+
string(1) "1"
17+
string(3) "0.0"
18+
bc math warning: non-zero scale in exponent

Diff for: ext/bcmath/tests/bug72093.phpt

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
--TEST--
22
Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
33
--SKIPIF--
4-
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
4+
<?php
5+
if(!extension_loaded("bcmath")) print "skip";
6+
if (substr(PHP_OS, 0, 3) == 'WIN') {
7+
die('skip Not valid for windows');
8+
}
9+
?>
510
--FILE--
611
<?php
712
var_dump(bcpowmod(1, "A", 128, -200));

Diff for: ext/exif/tests/bug72094.phpt

+25-25
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,51 @@ print_r(exif_read_data(__DIR__ . '/bug72094_4.jpg'));
1111
?>
1212
DONE
1313
--EXPECTF--
14-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
14+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1515

16-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
16+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1717

18-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
18+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
1919

20-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
20+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2121

22-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
22+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2323

24-
Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright ): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
24+
Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright ): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
2525

26-
Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %s/bug72094.php on line %d
26+
Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %s%ebug72094.php on line %d
2727

28-
Warning: exif_read_data(bug72094_1.jpg): File structure corrupted in %s/bug72094.php on line %d
28+
Warning: exif_read_data(bug72094_1.jpg): File structure corrupted in %s%ebug72094.php on line %d
2929

30-
Warning: exif_read_data(bug72094_1.jpg): Invalid JPEG file in %s/bug72094.php on line %d
30+
Warning: exif_read_data(bug72094_1.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
3131

32-
Warning: exif_read_data(bug72094_2.jpg): Illegal IFD size in %s/bug72094.php on line %d
32+
Warning: exif_read_data(bug72094_2.jpg): Illegal IFD size in %s%ebug72094.php on line %d
3333

34-
Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s/bug72094.php on line %d
34+
Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s%ebug72094.php on line %d
3535

36-
Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s/bug72094.php on line %d
36+
Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
3737

38-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
38+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
3939

40-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
40+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4141

42-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
42+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4343

44-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
44+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4545

46-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
46+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4747

48-
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d
48+
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
4949

50-
Warning: exif_read_data(bug72094_3.jpg): Illegal IFD size in %s/bug72094.php on line %d
50+
Warning: exif_read_data(bug72094_3.jpg): Illegal IFD size in %s%ebug72094.php on line %d
5151

52-
Warning: exif_read_data(bug72094_3.jpg): File structure corrupted in %s/bug72094.php on line %d
52+
Warning: exif_read_data(bug72094_3.jpg): File structure corrupted in %s%ebug72094.php on line %d
5353

54-
Warning: exif_read_data(bug72094_3.jpg): Invalid JPEG file in %s/bug72094.php on line %d
54+
Warning: exif_read_data(bug72094_3.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
5555

56-
Warning: exif_read_data(bug72094_4.jpg): Invalid TIFF start (1) in %s/bug72094.php on line %d
56+
Warning: exif_read_data(bug72094_4.jpg): Invalid TIFF start (1) in %s%ebug72094.php on line %d
5757

58-
Warning: exif_read_data(bug72094_4.jpg): File structure corrupted in %s/bug72094.php on line %d
58+
Warning: exif_read_data(bug72094_4.jpg): File structure corrupted in %s%ebug72094.php on line %d
5959

60-
Warning: exif_read_data(bug72094_4.jpg): Invalid JPEG file in %s/bug72094.php on line %d
61-
DONE
60+
Warning: exif_read_data(bug72094_4.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
61+
DONE

Diff for: ext/gd/tests/bug71912.phpt

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Bug #71912 (libgd: signedness vulnerability)
77
?>
88
--FILE--
99
<?php
10-
imagecreatefromgd2(__DIR__."/invalid_neg_size.gd2");
10+
imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . "invalid_neg_size.gd2");
1111
?>
1212
OK
1313
--EXPECTF--
1414

15-
Warning: imagecreatefromgd2(): '%s/invalid_neg_size.gd2' is not a valid GD2 file in %s/bug71912.php on line %d
16-
OK
15+
Warning: imagecreatefromgd2(): '%s%einvalid_neg_size.gd2' is not a valid GD2 file in %s%ebug71912.php on line %d
16+
OK

0 commit comments

Comments
 (0)