aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_skinny.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r--channels/chan_skinny.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 98d9d86d8..9de3faea6 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -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);