1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Description: Corrects the number of bytes in SilcUser.user_id.
Author: Michael Gorven <michael@gorven.za.net>
Forwarded: http://developer.berlios.de/patch/?func=detailpatch&patch_id=2694&group_id=6260
Last-Update: 2009-02-12
=== modified file 'pysilc-0.5/src/pysilc_user.c'
--- a/src/pysilc_user.c
+++ b/src/pysilc_user.c
@@ -149,9 +149,7 @@
if (PyObject_Cmp(temp, name, &result) == -1)
goto cleanup;
if (result == 0) {
- char buf[224];
- memcpy(&buf, &(pyuser->silcobj->id), 224);
- value = PyString_FromStringAndSize(buf, 224);
+ value = PyString_FromStringAndSize(&(pyuser->silcobj->id), sizeof(SilcClientID));
goto cleanup;
}
|