File tree 3 files changed +33
-1
lines changed 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ PHP NEWS
51
51
- JSON:
52
52
. Fixed bug GH-15168 (stack overflow in json_encode()). (nielsdos)
53
53
54
+ - GD:
55
+ . Fixed bug 16232 (bitshift overflow on wbmp file content reading /
56
+ fix backport from upstream). (David Carlier)
57
+
54
58
- LDAP:
55
59
. Fixed bug GH-16032 (Various NULL pointer dereferencements in
56
60
ldap_modify_batch()). (Girgias)
Original file line number Diff line number Diff line change 37
37
int
38
38
getmbi (int (* getin ) (void * in ), void * in )
39
39
{
40
- int i , mbi = 0 ;
40
+ unsigned int mbi = 0 ;
41
+ int i ;
41
42
42
43
do
43
44
{
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-16232 (Overflow on reading wbmp content)
3
+ --EXTENSIONS--
4
+ gd
5
+ --FILE--
6
+ <?php
7
+ $ good_webp = __DIR__ . '/src.wbmp ' ;
8
+ $ bad_webp = __DIR__ . "/gh16232.webp " ;
9
+ copy ($ good_webp , $ bad_webp );
10
+ var_dump (imagecreatefromwbmp ($ bad_webp ));
11
+ $ data = file_get_contents ($ bad_webp );
12
+ $ data [3 ] = chr (-1 );
13
+ file_put_contents ($ bad_webp , $ data );
14
+ var_dump (imagecreatefromwbmp ($ bad_webp ));
15
+ $ data [3 ] = chr (1000 );
16
+ file_put_contents ($ bad_webp , $ data );
17
+ var_dump (imagecreatefromwbmp ($ bad_webp ));
18
+ unlink ($ bad_webp );
19
+ --EXPECTF --
20
+ object (GdImage)#1 (0) {
21
+ }
22
+
23
+ Warning: imagecreatefromwbmp(): "%s " is not a valid WBMP file in %s on line %d
24
+ bool (false )
25
+
26
+ Warning: imagecreatefromwbmp (): "%s " is not a valid WBMP file in %s on line %d
27
+ bool (false )
You can’t perform that action at this time.
0 commit comments