summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-30 23:26:21 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-30 23:27:56 +0900
commit2c1e2db8769b6f5d31a7f46dc227cf1569937c23 (patch)
treede3c911a333f0e469fb214f84d0efbae6536b1d2
parent3de08599bfc45ee098c7c7b8f969dd9a62b6a49c (diff)
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
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c6
1 files changed, 6 insertions, 0 deletions
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)
1044{ 1044{
1045 char *edid_str = NULL; 1045 char *edid_str = NULL;
1046 unsigned char *blob; 1046 unsigned char *blob;
1047 unsigned char fallback_blob[128];
1047 1048
1048 EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL); 1049 EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
1049 1050
@@ -1054,6 +1055,11 @@ ecore_drm2_output_edid_get(Ecore_Drm2_Output *output)
1054 EINA_SAFETY_ON_NULL_RETURN_VAL(output->edid.blob, NULL); 1055 EINA_SAFETY_ON_NULL_RETURN_VAL(output->edid.blob, NULL);
1055 blob = output->edid.blob; 1056 blob = output->edid.blob;
1056 } 1057 }
1058 if (!blob)
1059 {
1060 memset(fallback_blob, 0, sizeof(fallback_blob));
1061 blob = fallback_blob;
1062 }
1057 1063
1058 edid_str = malloc((128 * 2) + 1); 1064 edid_str = malloc((128 * 2) + 1);
1059 if (edid_str) 1065 if (edid_str)