diff options
Diffstat (limited to 'recipes-graphics/directfb/directfb/Check-input-NULL-pointer.patch')
-rw-r--r-- | recipes-graphics/directfb/directfb/Check-input-NULL-pointer.patch | 42 |
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 @@ | |||
1 | From 0c1e3d1d54b7f2e637b0984ea10aef1de278ff87 Mon Sep 17 00:00:00 2001 | ||
2 | From: "yong.gan" <yong.gan@freescale.com> | ||
3 | Date: Fri, 23 May 2014 14:15:09 +0800 | ||
4 | Subject: [PATCH] Check input NULL pointer | ||
5 | |||
6 | Fix the segmentation fault in multi-instance test. | ||
7 | |||
8 | Upstream 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 | |||
14 | diff --git a/inputdrivers/linux_input/linux_input.c b/inputdrivers/linux_input/linux_input.c | ||
15 | index 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 */ | ||
27 | diff --git a/src/core/input.c b/src/core/input.c | ||
28 | index 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 | -- | ||
41 | 1.9.1 | ||
42 | |||