Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Chromium multi seat #96

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
wayland-ivi-extension: memory corruption fix
Backport this patch from the project master so it doesn't affect the
chromium browser when used in a multi-seat configuration.

[GDP-616] Fix memory corruption bug for Chromium multi-seat

Signed-off-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
  • Loading branch information
jaragunde committed Jun 1, 2017
commit 9ca2f6ff9b618900dd8e412db74ce0cd6fd31795
@@ -0,0 +1,29 @@
From b933a950ff8415217cbd29a4b0d89eace17c8cff Mon Sep 17 00:00:00 2001
From: Emre Ucan <eucan@de.adit-jv.com>
Date: Wed, 19 Apr 2017 10:23:16 +0200
Subject: [PATCH] ilmControl: fix memory corruption at input listener

Allocate memory in the size of accepted_seat struct instead of
size of a pointer of the struct

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
---
ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
index 0664016..5b4ad45 100644
--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
@@ -934,7 +934,7 @@ input_listener_input_acceptance(void *data,
return;
}

- accepted_seat = calloc(1, sizeof(accepted_seat));
+ accepted_seat = calloc(1, sizeof(*accepted_seat));
if (accepted_seat == NULL) {
fprintf(stderr, "Failed to allocate memory for accepted seat\n");
return;
--
2.1.4

Expand Up @@ -6,6 +6,7 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
SRC_URI_append = "\
file://EGLWLInputEventExample.service \
file://EGLWLMockNavigation.service \
file://0001-ilmControl-fix-memory-corruption-at-input-listener.patch \
"

FILES_${PN} += "\
Expand Down