Codebase list goffice / 569d8cb
New upstream release [0.10.6] Dmitry Smirnov 10 years ago
5 changed file(s) with 10 addition(s) and 73 deletion(s). Raw diff Collapse all Expand all
0 goffice (0.10.6-1) unstable; urgency=low
1
2 * New upstream release [August 2013].
3 * Dropped backported "pixbuf-fixes.patch".
4
5 -- Dmitry Smirnov <onlyjob@debian.org> Fri, 30 Aug 2013 14:03:56 +1000
6
07 goffice (0.10.4-2) unstable; urgency=low
18
29 * New patch to fix FTBFS on 32-bit architectures (Closes: #719034).
927927 go_path_clear@Base 0.9.0
928928 go_path_close@Base 0.9.0
929929 go_path_copy@Base 0.9.0
930 go_path_copy_restricted@Base 0.10.6
930931 go_path_curve_to@Base 0.9.0
931932 go_path_free@Base 0.9.0
932933 go_path_get_options@Base 0.9.0
933934 go_path_get_type@Base 0.9.0
934935 go_path_interpret@Base 0.9.0
936 go_path_interpret_full@Base 0.10.6
935937 go_path_line_to@Base 0.9.0
936938 go_path_move_to@Base 0.9.0
937939 go_path_new@Base 0.9.0
66
77 --- a/configure.ac
88 +++ b/configure.ac
9 @@ -425,9 +425,9 @@
9 @@ -433,9 +433,9 @@
1010 warning_options="-Wsign-compare -Wpointer-arith \
1111 -Wchar-subscripts -Wwrite-strings \
1212 -Wdeclaration-after-statement -Wnested-externs \
+0
-71
debian/patches/pixbuf-fixes.patch less more
0 Last-Update: 2013-08-08
1 Forwarded: not-needed
2 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719034
3 Author: Dmitry Smirnov <onlyjob@member.fsf.org>
4 Description: cherry-picked (backported) upstream pixbuf fixes.
5 393c569..3bf3453
6
7 --- a/goffice/utils/go-pixbuf.c
8 +++ b/goffice/utils/go-pixbuf.c
9 @@ -84,10 +84,13 @@
10 g_return_if_fail (GO_IS_PIXBUF (image));
11 pixbuf = GO_PIXBUF (image);
12 gsf_xml_out_add_int (output, "rowstride", pixbuf->rowstride);
13 if (!image->data) {
14 - image->data = g_new0 (guint8, image->height * pixbuf->rowstride);
15 - g_return_if_fail (image->data !=NULL);
16 + image->data = g_try_new0 (guint8, image->height * pixbuf->rowstride);
17 + if (image->data == NULL) {
18 + g_critical ("go_pixbuf_save: assertion `image->data != NULL' failed");
19 + return;
20 + }
21 pixbuf_to_cairo (pixbuf);
22 }
23 gsf_xml_out_add_base64
24 (output, NULL,
25 @@ -106,15 +109,24 @@
26 static void
27 go_pixbuf_load_data (GOImage *image, GsfXMLIn *xin)
28 {
29 size_t length, expected;
30 + int stride;
31 +
32 + stride = go_pixbuf_get_rowstride (GO_PIXBUF (image));
33 + g_return_if_fail (stride > 0);
34 +
35 length = gsf_base64_decode_simple (xin->content->str, strlen(xin->content->str));
36 - expected = image->height * go_pixbuf_get_rowstride (GO_PIXBUF (image));
37 + expected = image->height * (size_t)stride;
38 if (expected != length)
39 - g_critical ("Invalid image size, expected %lu bytes, got %lu", expected, length);
40 - image->data = g_malloc (expected);
41 - g_return_if_fail (image->data !=NULL);
42 - memcpy (image->data, xin->content->str, (length < expected)? length: expected);
43 + g_critical ("Invalid image size, expected %" G_GSIZE_FORMAT " bytes, got %" G_GSIZE_FORMAT,
44 + expected, length);
45 + image->data = g_try_malloc (expected);
46 + if (image->data == NULL) {
47 + g_critical ("go_pixbuf_load_data: assertion `image->data != NULL' failed");
48 + return;
49 + }
50 + memcpy (image->data, xin->content->str, MIN (length, expected));
51 if (length < expected) /* fill with 0 */
52 memset (image->data + length, 0, expected - length);
53 }
54
55 @@ -125,10 +137,13 @@
56 g_return_if_fail (pixbuf);
57 if (pixbuf->surface == NULL) {
58 if (image->data == NULL) {
59 /* image built from a pixbuf */
60 - image->data = g_new0 (guint8, image->height * pixbuf->rowstride);
61 - g_return_if_fail (image->data !=NULL);
62 + image->data = g_try_new0 (guint8, image->height * pixbuf->rowstride);
63 + if (image->data == NULL) {
64 + g_critical ("go_pixbuf_load_data: assertion `image->data != NULL' failed");
65 + return;
66 + }
67 pixbuf_to_cairo (pixbuf);
68 }
69 pixbuf->surface = cairo_image_surface_create_for_data (image->data,
70 CAIRO_FORMAT_ARGB32,
00 no-nested-externs-error.patch
1 pixbuf-fixes.patch