[FFmpeg-cvslog] oma: dont over-read buffer

Michael Niedermayer git at videolan.org
Tue Mar 27 13:36:39 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 27 12:52:53 2012 +0200| [dcd013a535bccbb163b740b72bbedde67dc8e633] | committer: Michael Niedermayer

oma: dont over-read buffer

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dcd013a535bccbb163b740b72bbedde67dc8e633
---

 libavformat/omadec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index a62b560..4777c13 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -377,7 +377,7 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     if (oc->encrypted) {
         /* previous unencrypted block saved in IV for the next packet (CBC mode) */
-        av_des_crypt(&oc->av_des, pkt->data, pkt->data, (packet_size >> 3), oc->iv, 1);
+        av_des_crypt(&oc->av_des, pkt->data, pkt->data, (ret >> 3), oc->iv, 1);
     }
 
     return ret;



More information about the ffmpeg-cvslog mailing list