diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2006-04-07 22:11:12 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2006-04-07 22:11:12 +0000 |
commit | bdff9c973d709a03954b184ad519d4b804d0e911 (patch) | |
tree | 5bff76ddf42eea086e47037e298722509a23b79b | |
parent | 815912457223a6e14a00de82c283b0fc0facad87 (diff) |
Merged revisions 18436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r18436 | tilghman | 2006-04-07 17:07:38 -0500 (Fri, 07 Apr 2006) | 2 lines
Bug 6913 - fix for possible buffer overflow
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-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; } |