diff options
author | Daniel Stone <daniel@fooishbar.org> | 2010-07-08 16:49:51 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:24 +0200 |
commit | b414bc2c6f389224023c1d184d8aa0d18387512c (patch) | |
tree | a3e8bdc0af20349de2b8ccb4d08abef7348d0365 | |
parent | c1b175d3d1496fdbbad783e8cc0319ca954829b4 (diff) | |
download | nx-libs-b414bc2c6f389224023c1d184d8aa0d18387512c.tar.gz nx-libs-b414bc2c6f389224023c1d184d8aa0d18387512c.tar.bz2 nx-libs-b414bc2c6f389224023c1d184d8aa0d18387512c.zip |
XStringToKeysym: Check strdup() return value
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
-rw-r--r-- | nx-X11/lib/X11/StrKeysym.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/StrKeysym.c b/nx-X11/lib/X11/StrKeysym.c index 98629ed18..a05e755e9 100644 --- a/nx-X11/lib/X11/StrKeysym.c +++ b/nx-X11/lib/X11/StrKeysym.c @@ -159,6 +159,8 @@ XStringToKeysym(_Xconst char *s) if (strncmp(s, "XF86_", 5) == 0) { KeySym ret; char *tmp = strdup(s); + if (!tmp) + return NoSymbol; memmove(&tmp[4], &tmp[5], strlen(s) - 5 + 1); ret = XStringToKeysym(tmp); free(tmp); |