On Thu, 15 Jan 2026 18:08:07 GMT, Phil Race <[email protected]> wrote:
>> SendaoYan has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Initial all the fields of pict_attr to zero
>
> src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRBackendNative.c line
> 342:
>
>> 340: Java_sun_java2d_xr_XRBackendNative_createPictureNative
>> 341: (JNIEnv *env, jclass cls, jint drawable, jlong formatPtr) {
>> 342: XRenderPictureAttributes pict_attr;
>
> This looks like an on-stack struct. It should be entirely initialized, not
> just one field, else it could be all sorts of random garbage.
> Zeroing it out would be a good start.
Thanks. The struct variable `pict_attr` has been initialed to {0}. this will
initial all the fields to zero.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29248#discussion_r2696698192