From: Damien Wedhorn Date: Mon, 20 Jan 2014 23:18:15 +0000 (+0000) Subject: Skinny: fix up handling of fragmented packets. X-Git-Tag: 12.1.0-rc1~3^2~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7affb5d3325ebc8dd757fcfee451acc682ef6ad8;p=thirdparty%2Fasterisk.git Skinny: fix up handling of fragmented packets. Bad offset in reading second or more fragment of skinny packets. Fixed to offset by char (single byte) rather than size of req. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405982 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index d8c3d6192f..fee2ee07e0 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -7595,7 +7595,7 @@ static void *skinny_session(void *data) bytesread = 0; while (1) { - if ((res = read(s->fd, &req->data+bytesread, dlen-bytesread)) < 0) { + if ((res = read(s->fd, ((char*)&req->data)+bytesread, dlen-bytesread)) < 0) { ast_log(LOG_WARNING, "Data read() returned error: %s\n", strerror(errno)); break; }