mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Fix an integer signedness problem.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2863,6 +2863,10 @@ static int get_input(struct skinnysession *s)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
dlen = letohl(*(int *)s->inbuf);
|
dlen = letohl(*(int *)s->inbuf);
|
||||||
|
if (dlen < 0) {
|
||||||
|
ast_log(LOG_WARNING, "Skinny Client sent invalid data.\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (dlen+8 > sizeof(s->inbuf)) {
|
if (dlen+8 > sizeof(s->inbuf)) {
|
||||||
dlen = sizeof(s->inbuf) - 8;
|
dlen = sizeof(s->inbuf) - 8;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user