commit 361aa4d366b7587625f1d6adc329fe824ee4b1d2 Author: Joshua Phillips Date: Fri Oct 8 19:10:05 2010 +0100 Check for malloc failure in two places. In xcb_key_symbols_alloc. In xcb_render_util_composite_text_stream. diff --git a/keysyms/keysyms.c b/keysyms/keysyms.c index c3e7f2e..062424c 100644 --- a/keysyms/keysyms.c +++ b/keysyms/keysyms.c @@ -81,6 +81,8 @@ xcb_key_symbols_alloc (xcb_connection_t *c) return NULL; syms = malloc (sizeof (xcb_key_symbols_t)); + if (!syms) + return NULL; syms->c = c; syms->tag = TAG_COOKIE; diff --git a/renderutil/glyph.c b/renderutil/glyph.c index 1721cad..4996202 100644 --- a/renderutil/glyph.c +++ b/renderutil/glyph.c @@ -66,6 +66,8 @@ xcb_render_util_composite_text_stream ( } stream = malloc(sizeof(xcb_render_util_composite_text_stream_t)); + if (!stream) + return NULL; stream->glyph_size = 0; stream->initial_glyphset = initial_glyphset;