From 0d2caa37c53bb8b479840572cb4dede2e2b30e8e Mon Sep 17 00:00:00 2001
From: Loren Merritt <lorenm@u.washington.edu>
Date: Tue, 25 Sep 2007 23:34:48 +0000
Subject: [PATCH] oops, potential overflow on really large blocks

Originally committed as revision 10587 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/flacenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 8dd55eabe04..e2357affebb 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -84,7 +84,7 @@ typedef struct FlacSubframe {
     int shift;
     RiceContext rc;
     int32_t samples[FLAC_MAX_BLOCKSIZE];
-    int32_t residual[FLAC_MAX_BLOCKSIZE];
+    int32_t residual[FLAC_MAX_BLOCKSIZE+1];
 } FlacSubframe;
 
 typedef struct FlacFrame {
-- 
GitLab