Hello Jérémy

>I just tried and can confirm that:
>
>- it still crashes at version 1.3.1-1
>- it still does not crash when reverting 8d58c8906 after version 1.3.1-2


so, it seems 8d58c8906 was not really needed

>i'm tempted to upload that fix right now to unstable, but you clearly have a 
>better
>view of what's the best move - so i'll do as you think it's best.
yes please, and if you want, please include my add-null-checks.patch patch!

I have upstreamed it, even if now with 1.4.0 that code changed in some parts.
That patch should be safe for unstable since it just checks for more null 
pointers and return
false in case, instead of crashing

G.
--- libepoxy-1.3.1.orig/src/dispatch_common.c
+++ libepoxy-1.3.1/src/dispatch_common.c
@@ -347,7 +347,7 @@ epoxy_conservative_gl_version(void)
 bool
 epoxy_extension_in_string(const char *extension_list, const char *ext)
 {
-    if (!extension_list)
+    if (!extension_list || !ext)
         return false;
     const char *ptr = extension_list;
     int len = strlen(ext);
@@ -382,6 +382,7 @@ epoxy_internal_has_gl_extension(const ch
 
         for (i = 0; i < num_extensions; i++) {
             const char *gl_ext = (const char *)glGetStringi(GL_EXTENSIONS, i);
+            if(! gl_ext) return false;
             if (strcmp(ext, gl_ext) == 0)
                 return true;
         }
--- libepoxy-1.3.1.orig/src/dispatch_egl.c
+++ libepoxy-1.3.1/src/dispatch_egl.c
@@ -43,12 +43,16 @@ epoxy_egl_version(EGLDisplay dpy)
 {
     int major, minor;
     const char *version_string;
-    int ret;
+    int ret=0, sscanf_ret;
 
-    version_string = eglQueryString(dpy, EGL_VERSION);
-    ret = sscanf(version_string, "%d.%d", &major, &minor);
-    assert(ret == 2);
-    return major * 10 + minor;
+    if ((version_string = eglQueryString(dpy, EGL_VERSION)))
+    {
+        sscanf_ret = sscanf(version_string, "%d.%d", &major, &minor);
+        assert(sscanf_ret == 2);
+        ret = major * 10 + minor;
+    }
+
+    return ret;
 }
 
 bool

Attachment: debdiff
Description: Binary data

Reply via email to