[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#798273: libatk-wrapper-java-jni:amd64: Segmentation fault, null pointer dereference



Samuel Thibault <sthibault@debian.org> (2015-09-07):
> Control: tags -1 + patch moreinfo
> 
> Could you try the attached patch?  It's basically the same idea but in a
> bit cleaner way.  I can upload that while I'm checking with upstream how
> they want to solve it.
> 
> Samuel

> --- a/jni/src/AtkWrapper.c
> +++ b/jni/src/AtkWrapper.c
> @@ -1192,6 +1192,12 @@ JNICALL Java_org_GNOME_Accessibility_Atk
>                                                                 jobject jAccContext)
>  {
>    jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext);
> +  if (global_ac == NULL)
> +  {
> +    if (jaw_debug)
> +      g_warning("Java_org_GNOME_Accessibility_AtkWrapper_componentAdded: global_ac == NULL");
> +    return FALSE;
> +  }
>    CallbackPara *para = alloc_callback_para(global_ac);
>    g_idle_add(component_added_handler, para);
>  }
> @@ -1251,6 +1257,12 @@ JNICALL Java_org_GNOME_Accessibility_Atk
>                                                                   jobject jAccContext)
>  {
>    jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext);
> +  if (global_ac == NULL)
> +  {
> +    if (jaw_debug)
> +      g_warning("Java_org_GNOME_Accessibility_AtkWrapper_componentAdded: global_ac == NULL");
                                                                     ^^^^^

ITYM Removed?

Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature


Reply to: