Bugs item #1587562, was opened at 2006-10-31 07:42
Message generated for change (Settings changed) made by ryo-dairiki
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=650539&aid=1587562&group_id=108454
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Other
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: CourtJester (courtjester)
Assigned to: ryo-dairiki (ryo-dairiki)
Summary: [scim-bridge] problem in scim_bridge_string_to_wstring
Initial Comment:
In scim-bridge 0.4.7 there is a problem in the function
scim_bridge_string_to_wstring found in
common/scim-bridge-string.c. Line 51 has
new_wstr_buffer = wstr_buffer;
I believe it should be
wstr_buffer = new_wstr_buffer;
In context the code is:
if (i > wstr_capacity) {
const size_t new_wstr_capacity = wstr_capacity + 10;
wchar *new_wstr_buffer = alloca (sizeof (wchar) *
(new_wstr_capacity + 1));
memcpy (new_wstr_buffer, wstr_buffer, sizeof (wchar)
* (wstr_capacity + 1));
new_wstr_buffer = wstr_buffer;
wstr_capacity = new_wstr_capacity;
}
The newly allocated buffer should be assigned to the
current buffer, but the current buffer is being
assinged to the newly allocation buffer. Note that the
capacity is being assigned correctly.
I found this problem when testing
gtk_im_context_get_surrounding code in kmfl.
Doug Rintoul.
----------------------------------------------------------------------
Comment By: ryo-dairiki (ryo-dairiki)
Date: 2006-11-23 11:44
Message:
Logged In: YES
user_id=1185193
Originator: NO
Thank you for reporting it.
I've already imported your patch.
It should be fixed in 0.4.8. :)
----------------------------------------------------------------------
Comment By: Jens-Ulrik Petersen (juhp)
Date: 2006-11-22 11:18
Message:
Logged In: YES
user_id=139853
Originator: NO
Thanks - I alerted Dairiki-san about this report.
A patch would probably make the fix clearer.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=650539&aid=1587562&group_id=108454
|