Skip to content
Snippets Groups Projects
Commit 63046de1 authored by Kevin P. Fleming's avatar Kevin P. Fleming
Browse files

properly handle signed integer input

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.0@45336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent e132aba5
Branches
Tags
No related merge requests found
......@@ -2305,6 +2305,10 @@ static int get_input(struct skinnysession *s)
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment