After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 350539 - check for NULL in camel_mime_part_get_content_type()
check for NULL in camel_mime_part_get_content_type()
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.6.x (obsolete)
Other other
: High critical
: ---
Assigned To: Milan Crha
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-08-09 07:52 UTC by ceo
Modified: 2007-08-16 10:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
proposed evo patch (13.70 KB, patch)
2007-08-09 10:16 UTC, Milan Crha
committed Details | Review
proposed eds patch (3.87 KB, patch)
2007-08-09 10:42 UTC, Milan Crha
committed Details | Review

Description ceo 2006-08-09 07:51:49 UTC
Distribution: Fedora Core release 5 (Bordeaux)
Package: bug-buddy
Severity: Normal
Version: GNOME2.14.0 2.14.x
Gnome-Distributor: Red Hat, Inc
Synopsis: Drag-n-drop PDF file attachement
Bugzilla-Product: bug-buddy
Bugzilla-Component: general
Bugzilla-Version: 2.14.x
BugBuddy-GnomeVersion: 2.0 (2.14.0)
Description:
Description of the crash:


Steps to reproduce the crash:
1. New email message
2. Drag and drop PDF file from smb://server/directory resource
3. Crash evolution!

Expected Results: doesn't crash.


How often does this happen?


Additional Information:



Debugging Information:

Backtrace was generated from '/usr/bin/evolution-2.6'

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
`shared object read from target memory' has disappeared; keeping its
symbols.
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1208342864 (LWP 3037)]
[New Thread -1528165472 (LWP 3069)]
[New Thread -1471239264 (LWP 3052)]
[New Thread -1460749408 (LWP 3051)]
[New Thread -1391666272 (LWP 3049)]
[New Thread -1380979808 (LWP 3048)]
[New Thread -1370489952 (LWP 3047)]
[New Thread -1298932832 (LWP 3045)]
[New Thread -1288442976 (LWP 3042)]
[New Thread -1277559904 (LWP 3041)]
[New Thread -1267065952 (LWP 3039)]
(no debugging symbols found)
0x009a9402 in __kernel_vsyscall ()

Thread 1 (Thread -1208342864 (LWP 3037))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 gnome_init_with_popt_table
    from /usr/lib/libgnomeui-2.so.0
  • #3 POA_GNOME_Evolution_DataServer_InterfaceCheck__fini
  • #4 <signal handler called>
  • #5 camel_mime_part_get_content_type
    from /usr/lib/libcamel-1.2.so.0
  • #6 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_override_class_closure
    from /usr/lib/libgobject-2.0.so.0
  • #9 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #11 e_attachment_build_remote_file
    from /usr/lib/evolution/2.6/libemiscwidgets.so.0
  • #12 gnome_vfs_job_get_count
    from /usr/lib/libgnomevfs-2.so.0
  • #13 g_list_remove_link
    from /usr/lib/libglib-2.0.so.0
  • #14 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #15 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #16 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #17 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #18 POA_GNOME_Evolution_DataServer_InterfaceCheck__fini
  • #19 __libc_start_main
    from /lib/libc.so.6
  • #20 ??




------- Bug created by bug-buddy at 2006-08-09 07:52 -------


Bugreport moved from bug-buddy / general
  to Evolution / Miscellaneous
Unknown version 2.14.x in product Evolution.  Setting version to "unspecified".

Comment 1 Harish Krishnaswamy 2006-08-09 08:24:16 UTC
Reassign to the right component.
Comment 2 André Klapper 2006-08-09 14:51:12 UTC
could be a duplicate of bug 327678
Comment 3 ushveen kaur 2006-10-18 04:44:06 UTC
ceo: are you still able to reproduce this?
Comment 4 parthasarathi susarla 2006-10-20 04:17:21 UTC
we should check if the mime_part is null in the function camel_mime_part_get_content_type as shown below:

CamelContentType *
camel_mime_part_get_content_type (CamelMimePart *mime_part)
{
        g_return_val_if_fail (CAMEL_IS_MIME_PART (mime_part), NULL);
        return ((CamelDataWrapper *) mime_part)->mime_type;
}

The smb share file might not have been actually downloaded, the mime_part would be NULL in such a case. 

Comment 5 Jeffrey Stedfast 2006-10-20 15:51:34 UTC
I feel that the check for NULL should be done at a level above camel_mime_part_get_content_type()
Comment 6 parthasarathi susarla 2006-11-14 20:59:56 UTC
(In reply to comment #5)
> I feel that the check for NULL should be done at a level above
> camel_mime_part_get_content_type()
> 

Agreed. That would be the absolutely right way to do it.
Comment 7 palfrey 2007-02-20 17:41:05 UTC
Thanks for taking the time to report this bug.
Unfortunately, that stack trace is missing some elements that will help a lot
to solve the problem, so it will be hard for the developers to fix that crash.
Can you get us a stack trace with debugging symbols? Please see
http://live.gnome.org/GettingTraces for more information on how to do so.
Thanks in advance!
Comment 8 Milan Crha 2007-08-09 10:16:09 UTC
Created attachment 93347 [details] [review]
proposed evo patch

for evolution;

I'm not sure with this much, it's a little bit paranoic here :)
Comment 9 Milan Crha 2007-08-09 10:42:06 UTC
Created attachment 93348 [details] [review]
proposed eds patch

for evolution-data-server;

All other places where is camel_mime_part_get_content_type used seems to me safe.
Comment 10 Srinivasa Ragavan 2007-08-13 05:09:39 UTC
Fejj, do you really want this way? Too many changes, I see. Unless there is a real reason/value for this.

PS: Some how, I always like g_free instead of free, because it checks for NULL and makes my code clean and more readable.
Comment 11 Srinivasa Ragavan 2007-08-16 09:56:19 UTC
If it is really required this way, lets commit. Milan, you gotto announce a few strings that you have introduced into this.
Comment 12 Milan Crha 2007-08-16 10:57:18 UTC
eds part committed to trunk. Committed revision 7962.
evo part committed to trunk. Committed revision 34017.

Announce string change mail sent too, I'm sorry for that, I didn't know.