File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ PHP NEWS
13
13
- FPM:
14
14
. Fixed GH-16432 (PHP-FPM 8.2 SIGSEGV in fpm_get_status). (Jakub Zelenka)
15
15
16
+ - GD:
17
+ . Fixed GH-16776 (imagecreatefromstring overflow). (David Carlier)
18
+
16
19
- Hash:
17
20
. Fixed GH-16711: Segfault in mhash(). (Girgias)
18
21
Original file line number Diff line number Diff line change @@ -1322,7 +1322,7 @@ static int _php_ctx_getmbi(gdIOCtx *ctx)
1322
1322
1323
1323
do {
1324
1324
i = (ctx -> getC )(ctx );
1325
- if (i < 0 ) {
1325
+ if (i < 0 || mbi > ( INT_MAX >> 7 ) ) {
1326
1326
return -1 ;
1327
1327
}
1328
1328
mbi = (mbi << 7 ) | (i & 0x7f );
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-16771 (UBSan abort in ext/gd/libgd/gd.c:1372)
3
+ --EXTENSIONS--
4
+ gd
5
+ --FILE--
6
+ <?php
7
+ $ string_mb = base64_decode ('5pel5pys6Kqe44OG44Kt44K544OIMzTvvJXvvJbml6XmnKzoqp7jg4bjgq3jgrnjg4g= ' );
8
+ imagecreatefromstring ($ string_mb );
9
+ --EXPECTF --
10
+ Warning: imagecreatefromstring(): Data is not in a recognized format in %s on line %d
You can’t perform that action at this time.
0 commit comments