From: Automerge script Date: Fri, 7 Apr 2006 23:05:40 +0000 (+0000) Subject: automerge commit X-Git-Tag: 1.2.7-netsec~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24298e447cc4ce23f5283153582eeef8cc3e3842;p=thirdparty%2Fasterisk.git automerge commit git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@18478 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c index d71aeec801..96fed0deab 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; }