[goffice] GOImage: at least get the length right.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] GOImage: at least get the length right.
- Date: Sat, 28 Feb 2015 00:13:23 +0000 (UTC)
commit f1515b4cc32b34a22901954e7db0a0caef5d633b
Author: Morten Welinder <terra gnome org>
Date: Fri Feb 27 19:13:07 2015 -0500
GOImage: at least get the length right.
ChangeLog | 3 +++
NEWS | 1 +
goffice/utils/go-pixbuf.c | 1 +
3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 77ba2a7..d72b96d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2015-02-27 Morten Welinder <terra gnome org>
+ * goffice/utils/go-pixbuf.c (go_pixbuf_load_data): Set
+ ->data_length.
+
* goffice/utils/go-image.c (go_image_new_from_data): If no image
data is given, create an unknown image placeholder.
diff --git a/NEWS b/NEWS
index 56dbf2b..2c91c20 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Morten:
* Plug leaks.
* Add tooltips to gradient selector.
* Add tooltips to pattern selector.
+ * GOImage fixes.
--------------------------------------------------------------------------
goffice 0.10.20:
diff --git a/goffice/utils/go-pixbuf.c b/goffice/utils/go-pixbuf.c
index b872e2b..6091d22 100644
--- a/goffice/utils/go-pixbuf.c
+++ b/goffice/utils/go-pixbuf.c
@@ -124,6 +124,7 @@ go_pixbuf_load_data (GOImage *image, GsfXMLIn *xin)
g_critical ("Invalid image size, expected %" G_GSIZE_FORMAT " bytes, got %" G_GSIZE_FORMAT,
expected, length);
image->data = g_try_malloc (expected);
+ image->data_length = expected;
if (image->data == NULL) {
g_critical ("go_pixbuf_load_data: assertion `image->data != NULL' failed");
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]