Bug #51498 [Sus->Ver]: imagefilledellipse does not work for large circles

From: Date: Fri, 30 Jul 2021 22:07:12 +0000
Subject: Bug #51498 [Sus->Ver]: imagefilledellipse does not work for large circles
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235498@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51498&edit=1 ID: 51498 Updated by: cmb@php.net Reported by: thomas dot sahlin at invented dot se Summary: imagefilledellipse does not work for large circles -Status: Suspended +Status: Verified Type: Bug Package: GD related Operating System: 32bit,LLP64 PHP Version: 5.6.10 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: The bug has been fixed upstream; I'll backport the fix. Previous Comments: ------------------------------------------------------------------------ [2021-07-30 22:06:39] cmb@php.net Related To: Bug #81315 ------------------------------------------------------------------------ [2019-06-11 09:10:52] cmb@php.net Related To: Bug #78133 ------------------------------------------------------------------------ [2019-06-10 21:03:24] cmb@php.net Related To: Bug #78133 ------------------------------------------------------------------------ [2015-07-11 17:11:26] cmb@php.net Related To: Bug #51593 ------------------------------------------------------------------------ [2015-06-28 18:41:23] cmb@php.net This happens also for imageellipse(). The code[1] shows, that it is an integer overflow issue in libgd. Consider w = h = 2200. Then a = 1100 b = 1100 aq = 1210000 bq = 1210000 dx = 2420000 dy = 2420000 r = 1331000000 rx = 2662000000 The value of rx doesn't really fit in a signed 32bit variable. However, long is 32bit on 32bit architectures and on LLP64 (e.g. Windows). Therefore the supplied test script fails on these architectures, but works on most 64bit Unix-like systems. I have reported the issue upstream[2] and suspend this ticket until the problem is resolved in libgd. [1] <http://lxr.php.net/xref/PHP_TRUNK/ext/gd/libgd/gd_arc.c#17> [2] <https://github.com/libgd/libgd/issues/169> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=51498 -- Edit this bug report at https://bugs.php.net/bug.php?id=51498&edit=1

« previous php.bugs (#235498) next »