GNOME Bugzilla – Bug 328304
Issues with file path in exchange plugins.
Last modified: 2006-01-27 12:04:59 UTC
Found some memory corruption while changing the folder properties, because the NULL character was added in the middle of the character string, which was freed later.
Created attachment 57947 [details] [review] patch
Created attachment 58092 [details] [review] patch Revised patch where URI manipulation is handled differently.
There are several instaces where you use strlen multiple times successively on the same string. Like in here: ruri = g_strconcat (tmpruri, uri_text + (strlen(uri_string)+1), NULL); path = g_build_filename ("/", uri_text + (strlen(uri_string)+1), NULL); Wouldn't it be good if you could store the strlen in a temporary local variable, instead of makine 2 calls. Would save (a few but valuable) cpu cycles. :D
Apart from what Partha has said above, may be you missed out on correcting this. + oldpath = g_strdup_printf ("/%s", contacts_old_src_uri+prefix_len); in e_exchange_contacts_commit. It should rather use a g_build_filename as is done in the other places in your patch. Looks good otherwise.
Incorporated the comments and committed the fix to cvs head.