You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a situation with an ico image where IcoParser->isPNG($data) passed, but then imagecreatefromstring($data) failed. The result is that in parsePNGAsIco() it crashes with a fatal error when it gets to the imagesx(false) line. Here is the bug fix:
private function parsePNGAsIco($data)
{
$png = imagecreatefromstring($data);
+ if (!$png) {
+ throw new \InvalidArgumentException('Invalid PNG file format');
+ }
$w = imagesx($png);
$h = imagesy($png);
Here is the icon that triggered the error for me. favicon.ico.zip
The text was updated successfully, but these errors were encountered:
I ran into a situation with an ico image where
IcoParser->isPNG($data)
passed, but thenimagecreatefromstring($data)
failed. The result is that inparsePNGAsIco()
it crashes with a fatal error when it gets to theimagesx(false)
line. Here is the bug fix:Here is the icon that triggered the error for me.
favicon.ico.zip
The text was updated successfully, but these errors were encountered: