[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo-commit
Subject:    [cairo-commit] src/cairo-ps-surface.c
From:       ickle () kemper ! freedesktop ! org (Chris Wilson)
Date:       2008-08-27 17:15:20
Message-ID: 20080827171520.BB49210096 () kemper ! freedesktop ! org
[Download RAW message or body]

 src/cairo-ps-surface.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a8c0998baf17357ce962dec795c9d6134e76e94a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Aug 27 14:58:53 2008 +0100

    [ps] Check tmpfile status after reading.
    
    Be paranoid and check to see if we encountered an error whilst reading the
    temporary file.

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 981f69d..8fcf89e 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -619,6 +619,9 @@ _cairo_ps_surface_emit_body (cairo_ps_surface_t *surface)
     while ((n = fread (buf, 1, sizeof (buf), surface->tmpfile)) > 0)
 	_cairo_output_stream_write (surface->final_stream, buf, n);
 
+    if (ferror (surface->tmpfile) != 0)
+	return _cairo_error (CAIRO_STATUS_TEMP_FILE_ERROR);
+
     return CAIRO_STATUS_SUCCESS;
 }
 
_______________________________________________
cairo-commit mailing list
cairo-commit@lists.cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic