[cairo-commit] 2 commits - src/cairo-output-stream.c
Carl Worth
cworth at kemper.freedesktop.org
Mon Mar 13 12:07:40 PST 2006
src/cairo-output-stream.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
New commits:
diff-tree 25cccaaa1f6d337a1a0423a298f94456e72a820a (from parents)
Merge: c780f4a5624f27a6cbf7829e10e8cd3544ae4f38 118f71b43870551db520ad56234c650aa4b61296
Author: Carl Worth <cworth at cworth.org>
Date: Mon Mar 13 12:05:37 2006 -0800
Merge branch 'cairo-origin' into cairo
diff-tree c780f4a5624f27a6cbf7829e10e8cd3544ae4f38 (from 92e09ee72fdde9059300b2b63d87e2bbd4286605)
Author: Carl Worth <cworth at cworth.org>
Date: Mon Mar 13 12:05:13 2006 -0800
cairo-output-stream: Don't dereference a NULL pointer due to OOM.
This close bug #6176:
Null pointer dereference on OOM in _cairo_output_stream_create_for_file()
https://bugs.freedesktop.org/show_bug.cgi?id=6176
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index a6db091..b07423c 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -305,9 +305,11 @@ _cairo_output_stream_create_for_file (co
return NULL;
stream = _cairo_output_stream_create (stdio_write, fp);
- if (stream == NULL)
+
+ if (stream)
+ stream->owns_closure_is_file = TRUE;
+ else
fclose (fp);
- stream->owns_closure_is_file = TRUE;
return stream;
}
More information about the cairo-commit
mailing list