diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-07 22:07:38 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-07 22:07:38 +0000 |
commit | e03eee9d5edea9d09f37ab7162f96f0817c195ee (patch) | |
tree | b73ba96cc3e19f533d4753529b4cf6da677a0a38 | |
parent | 427c217d48e8e855b72d9aee58f728e8fdeafaab (diff) |
Bug 6913 - fix for possible buffer overflow
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@18436 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | formats/format_jpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c index d71aeec80..96fed0dea 100644 --- a/formats/format_jpeg.c +++ b/formats/format_jpeg.c @@ -55,7 +55,7 @@ static struct ast_frame *jpeg_read_image(int fd, int len) struct ast_frame fr; int res; char buf[65536]; - if (len > sizeof(buf)) { + if (len > sizeof(buf) || len < 0) { ast_log(LOG_WARNING, "JPEG image too large to read\n"); return NULL; } |