[Xcb-commit] libxcb: src
Uli Schlachter
psychon at kemper.freedesktop.org
Sat Apr 1 09:50:45 UTC 2017
src/xcb_util.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit f830eb93c9c38b2c6c7ea2971af3bc6a61e92277
Author: Tobias Stoeckmann <tobias at stoeckmann.org>
Date: Sun Mar 26 15:41:12 2017 +0200
Check strdup for NULL return value.
_xcb_open does not check strdup's return value for NULL if launchd suport
was configured.
Signed-off-by: Tobias Stoeckmann <tobias at stoeckmann.org>
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/xcb_util.c b/src/xcb_util.c
index a3357ef..a16270c 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -265,6 +265,8 @@ static int _xcb_open(const char *host, char *protocol, const int display)
struct stat sbuf;
if (0 == stat(host, &sbuf)) {
file = strdup(host);
+ if(file == NULL)
+ return -1;
filelen = actual_filelen = strlen(file);
} else
#endif
More information about the xcb-commit
mailing list