Enlightenment CVS committal Author : chaos Project : e17 Module : libs/epsilon
Dir : e17/libs/epsilon/src/common Modified Files: epsilon_thumb_common.c Log Message: * Bad rbdpngn! Server and client used the bufsize field differently - and caused an overtransmit from client->server - therefore aborts, and a messy valgrind session =================================================================== RCS file: /cvs/e/e17/libs/epsilon/src/common/epsilon_thumb_common.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- epsilon_thumb_common.c 28 Mar 2006 09:10:14 -0000 1.1 +++ epsilon_thumb_common.c 29 Mar 2006 09:22:02 -0000 1.2 @@ -8,12 +8,13 @@ Epsilon_Message * epsilon_message_new(int nid, char *path, char *dst, int status) { - int size; + int size = 0; Epsilon_Message *msg; int dstlen = 0; int pathlen = 0; size = sizeof(Epsilon_Message); + if (path) pathlen = strlen(path) + 1; if (dst) @@ -28,9 +29,10 @@ msg->status = status; msg->nid = nid; msg->mid = mid++; - msg->bufsize = size; + msg->bufsize = size - sizeof(Epsilon_Message); if (path) { + body = ((char *)msg) + sizeof(Epsilon_Message); strcpy(body, path); } @@ -47,7 +49,7 @@ int epsilon_ipc_client_send(Ecore_Con_Client *cl, Epsilon_Message *msg) { - return ecore_con_client_send(cl, msg, + return ecore_con_client_send(cl, msg, sizeof(Epsilon_Message) + msg->bufsize); } ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs