[asterisk-commits] anthonyl: branch anthonyl/skinny-test-branch r47386 - /team/anthonyl/skinny-t...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Nov 9 11:05:30 MST 2006


Author: anthonyl
Date: Thu Nov  9 12:05:29 2006
New Revision: 47386

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47386
Log:
transmit_response should memcpy based on the size of the message not the size of the union which can be larger then the memory allocated for the message

Modified:
    team/anthonyl/skinny-test-branch/channels/chan_skinny.c

Modified: team/anthonyl/skinny-test-branch/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/skinny-test-branch/channels/chan_skinny.c?view=diff&rev=47386&r1=47385&r2=47386
==============================================================================
--- team/anthonyl/skinny-test-branch/channels/chan_skinny.c (original)
+++ team/anthonyl/skinny-test-branch/channels/chan_skinny.c Thu Nov  9 12:05:29 2006
@@ -1395,8 +1395,8 @@
 
 	memset(s->outbuf,0,sizeof(s->outbuf));
 	memcpy(s->outbuf, req, skinny_header_size);
-	memcpy(s->outbuf+skinny_header_size, &req->data, sizeof(union skinny_data));
-
+	memcpy(s->outbuf+skinny_header_size, &req->data, letohl(req->len));
+	
 	res = write(s->fd, s->outbuf, letohl(req->len)+8);
 
 	if (res != letohl(req->len)+8) {



More information about the asterisk-commits mailing list