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 328304 - Issues with file path in exchange plugins.
Issues with file path in exchange plugins.
Status: RESOLVED FIXED
Product: Evolution Exchange
Classification: Deprecated
Component: Connector
2.5.x
Other Linux
: Normal normal
: 2.5
Assigned To: Sushma Rai
Ximian Connector QA
Depends on:
Blocks: 327514
 
 
Reported: 2006-01-23 15:03 UTC by Sushma Rai
Modified: 2006-01-27 12:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (6.44 KB, patch)
2006-01-23 15:23 UTC, Sushma Rai
none Details | Review
patch (5.80 KB, patch)
2006-01-25 13:48 UTC, Sushma Rai
reviewed Details | Review

Description Sushma Rai 2006-01-23 15:03:26 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.
Comment 1 Sushma Rai 2006-01-23 15:23:59 UTC
Created attachment 57947 [details] [review]
patch
Comment 2 Sushma Rai 2006-01-25 13:48:56 UTC
Created attachment 58092 [details] [review]
patch

Revised patch where URI manipulation is handled differently.
Comment 3 parthasarathi susarla 2006-01-26 16:59:40 UTC
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

Comment 4 Sarfraaz Ahmed 2006-01-27 08:45:36 UTC
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.
Comment 5 Sushma Rai 2006-01-27 12:04:59 UTC
Incorporated the comments and committed the fix to cvs head.