[dia] [embedded image] ensure zero termination of inlined data



commit 7c9fbc7b84628de2ac057f891c2beb97775747aa
Author: Hans Breuer <hans breuer org>
Date:   Sun Sep 12 19:25:44 2010 +0200

    [embedded image] ensure zero termination of inlined data

 lib/prop_pixbuf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/lib/prop_pixbuf.c b/lib/prop_pixbuf.c
index 7f852d8..ddc3c22 100644
--- a/lib/prop_pixbuf.c
+++ b/lib/prop_pixbuf.c
@@ -163,6 +163,7 @@ data_add_pixbuf (AttributeNode attr, GdkPixbuf *pixbuf)
   g_byte_array_append (ed.array, "\0\0\0\0\0", 6);
   ed.size += g_base64_encode_close (TRUE, (gchar *)&ed.array->data[ed.size], 
 				    &ed.state, &ed.save);
+  ed.array->data[ed.size] = '\0';
 
   (void)xmlNewChild (comp_attr, NULL, (const xmlChar *)"data", ed.array->data);
 



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