[asterisk-commits] kpfleming: branch 1.0 r45336 -
/branches/1.0/channels/chan_skinny.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Oct 17 10:57:37 MST 2006
Author: kpfleming
Date: Tue Oct 17 12:57:36 2006
New Revision: 45336
URL: http://svn.digium.com/view/asterisk?rev=45336&view=rev
Log:
properly handle signed integer input
Modified:
branches/1.0/channels/chan_skinny.c
Modified: branches/1.0/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/branches/1.0/channels/chan_skinny.c?rev=45336&r1=45335&r2=45336&view=diff
==============================================================================
--- branches/1.0/channels/chan_skinny.c (original)
+++ branches/1.0/channels/chan_skinny.c Tue Oct 17 12:57:36 2006
@@ -2305,6 +2305,10 @@
return -1;
}
dlen = *(int *)s->inbuf;
+ if (dlen < 0) {
+ ast_log(LOG_WARNING, "Skinny Client sent invalid data.\n");
+ return -1;
+ }
if (dlen+8 > sizeof(s->inbuf))
dlen = sizeof(s->inbuf) - 8;
res = read(s->fd, s->inbuf+4, dlen+4);
More information about the asterisk-commits
mailing list