Hello,

Could you review a fix for jdk14, please?

 bug: https://bugs.openjdk.java.net/browse/JDK-8230782
 webrev: http://cr.openjdk.java.net/~dmarkov/8230782/webrev.00/

Problem description:
After integration of JDK-8210776 [1] we started to use malloc() function for 
allocation of XColor array in QueryColorMap() (see multiVis.c). However 
malloc() does not initialise allocated memory. So if the memory contains some 
“garbage” we may get incorrect data inside the array. As a result 
Robot.createsScreenCapture() retrieves incorrect colours.

Fix:
It is necessary to invoke calloc() for allocation of the array as it used to be 
before XWD upgrade

Thanks,
Dmitry

[1] - https://bugs.openjdk.java.net/browse/JDK-8210776

Reply via email to