[goffice] Make reading EMF files more solid.



commit f735eb41d39ae6a9cc91691fe618c51896827e17
Author: Jean Brefort <jean brefort normalesup org>
Date:   Wed Jul 17 11:50:25 2013 +0200

    Make reading EMF files more solid.

 goffice/utils/go-emf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/goffice/utils/go-emf.c b/goffice/utils/go-emf.c
index 27d6869..226b87a 100644
--- a/goffice/utils/go-emf.c
+++ b/goffice/utils/go-emf.c
@@ -4684,6 +4684,8 @@ go_emf_parse (GOEmf *emf, GsfInput *input, GError **error)
                                break;
                        state.length = rsize;
                        state.data = gsf_input_read (input, rsize, NULL);
+                       if (!state.data)
+                               break;
                        if (!go_emf_handlers[rid] (&state))
                                break;
                        if (offset + 4 >= fsize)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]