From: Sven Verdoolaege Date: Tue, 17 Jul 2012 17:01:21 +0000 (+0200) Subject: isl_stream_new_str: fail on NULL input X-Git-Tag: isl-0.11~121 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c7ca27b8bf01170258aeb24c87a26680becafc8;p=platform%2Fupstream%2Fisl.git isl_stream_new_str: fail on NULL input Signed-off-by: Sven Verdoolaege --- diff --git a/isl_stream.c b/isl_stream.c index c70b4be..68f6e52 100644 --- a/isl_stream.c +++ b/isl_stream.c @@ -173,7 +173,10 @@ struct isl_stream* isl_stream_new_file(struct isl_ctx *ctx, FILE *file) struct isl_stream* isl_stream_new_str(struct isl_ctx *ctx, const char *str) { - struct isl_stream *s = isl_stream_new(ctx); + struct isl_stream *s; + if (!str) + return NULL; + s = isl_stream_new(ctx); if (!s) return NULL; s->str = str;