On Thu, 1 Oct 2026 07:43:27 GMT, Timofei Fedotov <[email protected]> wrote:

>> src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c line 285:
>> 
>>> 283:                     colorMap->Colors &&
>>> 284:                     transparentColor < 0 &&
>>> 285:                     gif->SBackGroundColor < colorMap->ColorCount) {
>> 
>> Looks like gif->SBackGroundColor originated from an unsigned char, so we 
>> should not need to check for < 0 .. so this should be OK.
>> 
>> Don't we need a test for this ? It may not crash reliably, but a gif with a 
>> small colormap size and invalid b/g color might occasionally do so .. 
>> 
>> You'd have to create the GIF from scratch, one taken from somewhere else and 
>> edited would not pass the OCA rules. Also don't use AI to generate it (!) 
>> that would also be against the rules.
>
> Can I create two GIFs a valid one and a malformed one, using helper classes, 
> and use them as test input?

You mean that you will write some code that generates gifs "on the fly" at run 
time, rather than checking in static images ? I don't see a problem with that.  
Probably it is even a better way to do it.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33145#discussion_r4160241714

Reply via email to