raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2c1e2db8769b6f5d31a7f46dc227cf1569937c23

commit 2c1e2db8769b6f5d31a7f46dc227cf1569937c23
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sun Jul 30 23:26:21 2017 +0900

    ecore_drm2 - fix startup if edid blob is null.. assume all 0's
    
    this causes a crash when no edid is available. survive and dont crash.
    this causes e wayland to not work at all on my baytrail laptop.
    
    @fix
---
 src/lib/ecore_drm2/ecore_drm2_outputs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c 
b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 85504a0d6d..ffd7a40d93 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -1044,6 +1044,7 @@ ecore_drm2_output_edid_get(Ecore_Drm2_Output *output)
 {
    char *edid_str = NULL;
    unsigned char *blob;
+   unsigned char fallback_blob[128];
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
 
@@ -1054,6 +1055,11 @@ ecore_drm2_output_edid_get(Ecore_Drm2_Output *output)
         EINA_SAFETY_ON_NULL_RETURN_VAL(output->edid.blob, NULL);
         blob = output->edid.blob;
      }
+   if (!blob)
+     {
+        memset(fallback_blob, 0, sizeof(fallback_blob));
+        blob = fallback_blob;
+     }
 
    edid_str = malloc((128 * 2) + 1);
    if (edid_str)

-- 


Reply via email to