Re: Fix for an small memory issue



Approved

On Mon, 2008-04-07 at 12:23 +0200, Sergio Villar Senin wrote:
> Hi,
> 
> this patch fixes an small memory issue detected by valgrind when trying
> to parse addresses like "<somebody something com>".
> 
> The error report:
> ==29209== Invalid read of size 1
> ==29209==    at 0x4100BE3: _string_to_camel_inet_addr
> (tny-camel-common.c:268)
> ==29209==    by 0x4100CCE: _foreach_email_add_to_inet_addr
> (tny-camel-common.c:304)
> ==29209==    by 0x4102BCC: tny_camel_msg_header_set_replyto
> (tny-camel-msg-header.c:196)
> ==29209==    by 0x413D7DC: tny_header_set_replyto (tny-header.c:57)
> ==29209==    by 0x80854AC: modest_tny_msg_new (modest-tny-msg.c:75)
> ==29209==    by 0x808ADA0: modest_ui_actions_compose_msg
> (modest-ui-actions.c:750)
> ==29209==    by 0x808AF8D: modest_ui_actions_on_new_msg
> (modest-ui-actions.c:788)
> 
> ==29209==  Address 0x9b6525f is 1 bytes before a block of size 15 alloc'd
> ==29209==    at 0x40207C4: malloc (vg_replace_malloc.c:207)
> ==29209==    by 0x4C31E9C: g_malloc (in
> /targets/CHINOOK_X86/usr/lib/libglib-2.0.so.0.1200.12)
> ==29209==    by 0x4C43428: g_strdup (in
> /targets/CHINOOK_X86/usr/lib/libglib-2.0.so.0.1200.12)
> ==29209==    by 0x4100AC9: split_recipients (tny-camel-common.c:233)
> ==29209==    by 0x4100CA9: _foreach_email_add_to_inet_addr
> (tny-camel-common.c:298)
> ==29209==    by 0x4102BCC: tny_camel_msg_header_set_replyto
> (tny-camel-msg-header.c:196)
> ==29209==    by 0x413D7DC: tny_header_set_replyto (tny-header.c:57)
> ==29209==    by 0x80854AC: modest_tny_msg_new (modest-tny-msg.c:75)
> ==29209==    by 0x808ADA0: modest_ui_actions_compose_msg
> (modest-ui-actions.c:750)
> ==29209==    by 0x808AF8D: modest_ui_actions_on_new_msg
> (modest-ui-actions.c:788)
> 


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]