File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ PHP NEWS
3333- JSON:
3434 . Fixed bug GH-15168 (stack overflow in json_encode()). (nielsdos)
3535
36+ - GD:
37+ . Fixed bug 16232 (bitshift overflow on wbmp file content reading /
38+ fix backport from upstream). (David Carlier)
39+
3640- LDAP:
3741 . Fixed bug GH-16032 (Various NULL pointer dereferencements in
3842 ldap_modify_batch()). (Girgias)
Original file line number Diff line number Diff line change 3737int
3838getmbi (int (* getin ) (void * in ), void * in )
3939{
40- int i , mbi = 0 ;
40+ unsigned int mbi = 0 ;
41+ int i ;
4142
4243 do
4344 {
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