projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e783f3
)
isl_stream_new_str: fail on NULL input
author
Sven Verdoolaege
<skimo@kotnet.org>
Tue, 17 Jul 2012 17:01:21 +0000
(19:01 +0200)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Tue, 18 Sep 2012 13:08:20 +0000
(15:08 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_stream.c
patch
|
blob
|
history
diff --git
a/isl_stream.c
b/isl_stream.c
index
c70b4be
..
68f6e52
100644
(file)
--- 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;