8365609: Fix several potential NULL native pointer dereferences in the desktop module

Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Artem Semenov Artem Semenov <savoptik@altlinux.org>

Reviewed-by: azvegint, prr, serb
This commit is contained in:
Artem Semenov 2025-10-16 07:28:13 +00:00
parent 7fe0665730
commit aed42a16ba
2 changed files with 4 additions and 5 deletions

View File

@ -279,7 +279,9 @@ SplashDecodeGif(Splash * splash, GifFileType * gif)
ImageRect dstRect;
rgbquad_t fillColor = 0; // 0 is transparent
if (transparentColor < 0) {
if (colorMap &&
colorMap->Colors &&
transparentColor < 0) {
fillColor= MAKE_QUAD_GIF(
colorMap->Colors[gif->SBackGroundColor], 0xff);
}

View File

@ -276,10 +276,7 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
fp_gtk_check_version = dl_symbol("gtk_check_version");
/* GLib */
fp_glib_check_version = dlsym(gtk3_libhandle, "glib_check_version");
if (!fp_glib_check_version) {
dlerror();
}
fp_glib_check_version = dl_symbol("glib_check_version");
fp_g_free = dl_symbol("g_free");
fp_g_object_unref = dl_symbol("g_object_unref");