Changeset 3812

Show
Ignore:
Timestamp:
11/19/08 15:31:24
Author:
svillar
Message:

Fixes a crash when decoding mime parts while purging them. Merged from trunk r3811

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/modest/diablo-pe2/ChangeLog

    r3809 r3812  
     12008-11-19  Sergio Villar Senin  <svillar@igalia.com> 
     2 
     3        * libtinymail-camel/tny-camel-mime-part.c 
     4        (tny_camel_mime_part_decode_to_stream_default):  
     5        adds a reference to protect wrapper when decoding to a stream 
     6 
    172008-11-19  Jose Dapena Paz  <jdapena@igalia.com> 
    28 
     
    4854        only write in chunks when writing to sockets, do not do it when 
    4955        writing to a local filesystem. This speeds up writings a lot. 
     56        * 
     57        libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-summary.c: 
     58        adds an extra check that prevents crashes when reading data from 
     59        corrupted media. 
    5060 
    51612008-10-06  Sergio Villar Senin  <svillar@igalia.com> 
  • releases/modest/diablo-pe2/libtinymail-camel/tny-camel-mime-part.c

    r3758 r3812  
    782782 
    783783        wrapper = camel_medium_get_content_object (medium); 
     784        camel_object_ref (wrapper); 
    784785 
    785786        if (G_UNLIKELY (!wrapper)) { 
     
    789790                return -1; 
    790791        } 
    791          
     792 
    792793        if (camel_content_type_is (wrapper->mime_type, "text", "*")) 
    793794                bytes = (gssize) camel_stream_format_text (wrapper, cstream); 
     
    795796                bytes = (gssize) camel_data_wrapper_decode_to_stream (wrapper, cstream); 
    796797 
     798        camel_object_unref (wrapper); 
    797799        camel_object_unref (cstream); 
    798800        camel_object_unref (medium); 
    799          
     801 
    800802        if (bytes < 0) { 
    801803                g_set_error (err, TNY_IO_ERROR,