projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc306fb
)
ecore_wayland: add null check after realloc to avoid dereferencing a null pointer
20/49420/1
author
Gwanglim Lee
<gl77.lee@samsung.com>
Tue, 13 Oct 2015 05:56:19 +0000
(14:56 +0900)
committer
Gwanglim Lee
<gl77.lee@samsung.com>
Tue, 13 Oct 2015 05:56:19 +0000
(14:56 +0900)
Change-Id: Ie903e619cb990ecaf4cbfc028d4c79548b39891f
src/lib/ecore_wayland/ecore_wl.c
patch
|
blob
|
history
diff --git
a/src/lib/ecore_wayland/ecore_wl.c
b/src/lib/ecore_wayland/ecore_wl.c
index
5d4007c
..
1f97462
100644
(file)
--- a/
src/lib/ecore_wayland/ecore_wl.c
+++ b/
src/lib/ecore_wayland/ecore_wl.c
@@
-1006,7
+1006,8
@@
static void find_keycode(struct xkb_keymap *keymap, xkb_keycode_t key, void *dat
{
found_keycodes->num_keycodes++;
found_keycodes->keycodes = realloc(found_keycodes->keycodes, sizeof(int) * found_keycodes->num_keycodes);
- found_keycodes->keycodes[found_keycodes->num_keycodes - 1] = key;
+ if (found_keycodes->keycodes)
+ found_keycodes->keycodes[found_keycodes->num_keycodes - 1] = key;
}
}
}