[Debian-med-packaging] Bug#731435: warning: iteration 55823u invokes undefined behavior [-Waggressive-loop-optimizations]

Alberto Garcia berto at igalia.com
Mon Apr 6 10:07:35 BST 2020


On Mon, Apr 06, 2020 at 10:29:35AM +0200, Mathieu Malaterre wrote:

> http://git.dcmtk.org/?p=dcmtk.git;a=commit;h=180d9b9

I have to say that I don't see how the changes to jccolor.c solve the
problem ... the warning that we have is about this line:

     rgb_ycc_tab[i+G_Y_OFF] = FIX(0.58700) * i;

This is round(0.58700 * 65536) * 55823 = 2147510810, which exceeds
INT32_MAX and therefore cannot be stored in rgb_ycc_tab, no matter how
many casts you use.

Berto



More information about the Debian-med-packaging mailing list