summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/directfb/directfb/Check-input-NULL-pointer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/directfb/directfb/Check-input-NULL-pointer.patch')
-rw-r--r--recipes-graphics/directfb/directfb/Check-input-NULL-pointer.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-graphics/directfb/directfb/Check-input-NULL-pointer.patch b/recipes-graphics/directfb/directfb/Check-input-NULL-pointer.patch
new file mode 100644
index 00000000..1d541722
--- /dev/null
+++ b/recipes-graphics/directfb/directfb/Check-input-NULL-pointer.patch
@@ -0,0 +1,42 @@
1From 0c1e3d1d54b7f2e637b0984ea10aef1de278ff87 Mon Sep 17 00:00:00 2001
2From: "yong.gan" <yong.gan@freescale.com>
3Date: Fri, 23 May 2014 14:15:09 +0800
4Subject: [PATCH] Check input NULL pointer
5
6Fix the segmentation fault in multi-instance test.
7
8Upstream Status: Pending
9---
10 inputdrivers/linux_input/linux_input.c | 2 +-
11 src/core/input.c | 2 ++
12 2 files changed, 3 insertions(+), 1 deletion(-)
13
14diff --git a/inputdrivers/linux_input/linux_input.c b/inputdrivers/linux_input/linux_input.c
15index e275762..35cfbdd 100644
16--- a/inputdrivers/linux_input/linux_input.c
17+++ b/inputdrivers/linux_input/linux_input.c
18@@ -1979,7 +1979,7 @@ driver_get_keymap_entry( CoreInputDevice *device,
19 unsigned short value;
20 DFBInputDeviceKeyIdentifier identifier;
21
22- if (data->vt_fd < 0)
23+ if (data == NULL || data->vt_fd < 0)
24 return DFB_UNSUPPORTED;
25
26 /* fetch the base level */
27diff --git a/src/core/input.c b/src/core/input.c
28index d77bc9f..ee23909 100644
29--- a/src/core/input.c
30+++ b/src/core/input.c
31@@ -723,6 +723,8 @@ dfb_input_core_suspend( DFBInputCore *data )
32 driver->info.name );
33 }
34 }
35+ if(data == NULL)
36+ return DFB_FAILURE;
37
38 direct_list_foreach (device, data->devices) {
39 InputDeviceShared *devshared;
40--
411.9.1
42