[Evolution] Bug#443483: Bug in image dimensions handling (may return zero in some circusments)

Krzysztof Sobiecki sobkas at gmail.com
Fri Sep 21 17:38:35 UTC 2007


Package: evolution
Version: 2.10.3-1
Severity: important
Tags: patch

--- Please enter the report below this line. ---
I thing there is bug in image dimensions handling (may return zero in some cases).
			
			pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);                                                                    
                        width = gdk_pixbuf_get_width (pixbuf);                                                                             
                        height = gdk_pixbuf_get_height (pixbuf);                                                                           
                        if (width >= height) {                                                                                             
                                if (width > 48) {                                                                                          
                                        ratio = width / 48;                                                                                
                                        width = 48;                                                                                        
                                        height = height / ratio; (1)                                                                          
                                }                                                                                                          
                        } else {                                                                                                           
                                if (height > 48) {                                                                                         
                                        ratio = height / 48;                                                                               
                                        height = 48;                                                                                       
                                        width = width / ratio; (2)                                                                            
                                }                                                                                                          
                        }

If ratio is bigger than height(1) or width(2) it might end as 0.
I have patch that hacks it.

Backtrace:

GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `dest_width > 0' failed
aborting...

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb4d70b90 (LWP 24312)]
0xb7f96410 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7f96410 in __kernel_vsyscall ()
#1  0xb6d177f5 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb6d19181 in abort () from /lib/i686/cmov/libc.so.6
#3  0xb6e6ce99 in IA__g_logv (log_domain=0xb7257c00 "GdkPixbuf", log_level=G_LOG_LEVEL_CRITICAL, 
    format=0xb6e9d875 "%s: assertion `%s' failed", args1=0xb4d701cc "�\224%�P\224%�\020���\001")
    at /tmp/buildd/glib2.0-2.14.1/glib/gmessages.c:497
#4  0xb6e6cec9 in IA__g_log (log_domain=0xb7257c00 "GdkPixbuf", log_level=G_LOG_LEVEL_CRITICAL, 
    format=0xb6e9d875 "%s: assertion `%s' failed") at /tmp/buildd/glib2.0-2.14.1/glib/gmessages.c:517
#5  0xb6e6cfab in IA__g_return_if_fail_warning (log_domain=0xb7257c00 "GdkPixbuf", pretty_function=0xb72594ca "gdk_pixbuf_scale_simple", 
    expression=0xb7259450 "dest_width > 0") at /tmp/buildd/glib2.0-2.14.1/glib/gmessages.c:532
#6  0xb724f1c4 in IA__gdk_pixbuf_scale_simple (src=0x8e78210, dest_width=0, dest_height=48, interp_type=GDK_INTERP_BILINEAR)
    at /tmp/buildd/gtk+2.0-2.12.0/gdk-pixbuf/gdk-pixbuf-scale.c:251
#7  0xb7f42c7b in e_attachment_bar_create_attachment_cache (attachment=0x8972228) at e-attachment-bar.c:237
#8  0xb5f98764 in efhd_format_attachment (emf=0x8422000, stream=0x8c866c8, part=0xb23d5648, mime_type=0x95017b0 "image/gif", 
    handle=0xb5fff400) at em-format-html-display.c:2381
#9  0xb5f9fbad in em_format_part_as (emf=0x8422000, stream=0x8c866c8, part=0xb23d5648, mime_type=0x95017b0 "image/gif") at em-format.c:595
#10 0xb5f9fcf5 in em_format_part (emf=0x8422000, stream=0x8c866c8, part=0xb23d5648) at em-format.c:614
#11 0xb5f9cf45 in emfh_multipart_related_check (job=0x82945d8, cancelled=0) at em-format-html.c:1024
#12 0xb5f9b573 in efh_format_do (mm=0x89408a8) at em-format-html.c:1254
#13 0xb5fbfb65 in mail_msg_received (e=0x819f130, msg=0x89408a8, data=0x0) at mail-mt.c:582
#14 0xb7b83b50 in thread_dispatch (din=0x819f130) at e-msgport.c:1005
#15 0xb77b046b in start_thread () from /lib/i686/cmov/libpthread.so.0
#16 0xb6dc06de in clone () from /lib/i686/cmov/libc.so.6

I hope this will help.

--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.23-rc6-sobkas-g19299b1a

Debian Release: lenny/sid
  500 unstable        www.debian-multimedia.org 
  500 unstable        ftp.pl.debian.org 
  500 kernel-dists-trunk kernel-archive.buildserver.net 
  500 experimental    www.debian-multimedia.org 
  500 experimental    ftp.pl.debian.org 

--- Package information. ---
Depends                                  (Version) | Installed
==================================================-+-======================
libart-2.0-2                           (>= 2.3.18) | 2.3.19-3
libatk1.0-0                            (>= 1.13.2) | 1.20.0-1
libbonobo2-0                           (>= 2.15.0) | 2.20.0-1
libbonoboui2-0                         (>= 2.15.1) | 2.20.0-1
libc6                                   (>= 2.6-1) | 2.6.1-5
libcairo2                               (>= 1.4.0) | 1.4.10-1
libcamel1.2-10                         (>= 1.10.2) | 1.10.3-1
libdbus-1-3                             (>= 1.1.1) | 1.1.1-3
libdbus-glib-1-2                         (>= 0.74) | 0.74-1
libebook1.2-9                          (>= 1.10.2) | 1.10.3-1
libecal1.2-7                           (>= 1.10.2) | 1.10.3-1
libedataserver1.2-9                    (>= 1.10.2) | 1.10.3-1
libedataserverui1.2-8                  (>= 1.10.2) | 1.10.3-1
libegroupwise1.2-13                    (>= 1.10.2) | 1.10.3-1
libexchange-storage1.2-3               (>= 1.10.2) | 1.10.3-1
libfontconfig1                          (>= 2.4.0) | 2.4.2-1.2
libfreetype6                            (>= 2.3.5) | 2.3.5-1+b1
libgconf2-4                            (>= 2.13.5) | 2.19.1-1
libglade2-0                           (>= 1:2.6.1) | 1:2.6.2-1
libglib2.0-0                           (>= 2.12.9) | 2.14.1-3
libgnome-keyring0                         (>= 0.8) | 0.8.1-2
libgnome-pilot2                         (>= 2.0.2) | 2.0.15-2
libgnome2-0                            (>= 2.17.3) | 2.20.0-1
libgnomecanvas2-0                      (>= 2.11.1) | 2.20.0-1
libgnomeprint2.2-0                     (>= 2.17.0) | 2.18.1-1
libgnomeprintui2.2-0                   (>= 2.17.0) | 2.18.0-2
libgnomeui-0                           (>= 2.17.1) | 2.19.1-1
libgnomevfs2-0                      (>= 1:2.17.90) | 1:2.20.0-1
libgnutls13                           (>= 1.6.3-0) | 1.7.19-1
libgtk2.0-0                         (>= 2.10.12-3) | 2.12.0-2
libgtkhtml3.14-19                      (>= 3.14.3) | 3.14.3-1
libhal1                                 (>= 0.5.9) | 0.5.9.1-4
libice6                               (>= 1:1.0.0) | 2:1.0.4-1
libldap2                             (>= 2.1.17-1) | 2.1.30.dfsg-13.5
libnm-glib0                                        | 0.6.5-1
libnotify1                              (>= 0.4.4) | 0.4.4-3
libnotify1-gtk2.10                                 | 
libnspr4-0d                          (>= 1.8.0.10) | 4.6.7-1
libnss3-0d                             (>= 3.11.7) | 3.11.7-1
liborbit2                            (>= 1:2.14.1) | 1:2.14.7-0.1
libpango1.0-0                          (>= 1.16.4) | 1.18.2-1
libpisock9                                         | 0.12.2-10
libpisync0                                         | 0.12.2-10
libpng12-0                           (>= 1.2.13-4) | 1.2.15~beta5-2
libpopt0                                 (>= 1.10) | 1.10-3
libsm6                                             | 2:1.0.3-1+b1
libsoup2.2-8                           (>= 2.2.98) | 2.2.100-1
libx11-6                                           | 2:1.1.3-1
libxcursor1                             (>> 1.1.2) | 1:1.1.9-1
libxext6                                           | 1:1.0.3-2
libxfixes3                            (>= 1:4.0.1) | 1:4.0.3-2
libxi6                                             | 2:1.1.3-1
libxinerama1                                       | 1:1.0.2-1
libxml2                                (>= 2.6.29) | 2.6.30.dfsg-2
libxrandr2                            (>= 2:1.2.0) | 2:1.2.2-1
libxrender1                                        | 1:0.9.4-1
zlib1g                       (>= 1:1.2.3.3.dfsg-1) | 1:1.2.3.3.dfsg-5
gconf2                               (>= 2.10.1-2) | 2.19.1-1
evolution-common                      (= 2.10.3-1) | 2.10.3-1
evolution-data-server                   (>= 1.9.4) | 1.10.3-1
gtkhtml3.14                            (>= 3.14.0) | 3.14.3-1
gnome-icon-theme                        (>= 1.2.0) | 2.18.0-3
dbus                                               | 1.1.1-3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: evo.diff
Type: text/x-patch
Size: 816 bytes
Desc: Patch
Url : http://lists.alioth.debian.org/pipermail/pkg-evolution-maintainers/attachments/20070921/e078dfa4/attachment-0001.bin 


More information about the Pkg-evolution-maintainers mailing list