[FFmpeg-cvslog] avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior

Michael Niedermayer git at videolan.org
Thu Mar 12 00:52:53 CET 2015


ffmpeg | branch: release/0.7 | Michael Niedermayer <michaelni at gmx.at> | Wed Feb  4 14:47:41 2015 +0100| [c68fe8ac8b9d0602e24e1c8c5d575fb21a8b3364] | committer: Michael Niedermayer

avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 05e161952954acf247e0fd1fdef00559675c4d4d)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mpc8.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 4d95a1d..3193f5d 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -54,7 +54,7 @@ typedef struct {
 
 static inline int64_t bs_get_v(uint8_t **bs)
 {
-    int64_t v = 0;
+    uint64_t v = 0;
     int br = 0;
     int c;
 
@@ -105,7 +105,7 @@ static int mpc8_probe(AVProbeData *p)
 
 static inline int64_t gb_get_v(GetBitContext *gb)
 {
-    int64_t v = 0;
+    uint64_t v = 0;
     int bits = 0;
     while(get_bits1(gb) && bits < 64-7){
         v <<= 7;



More information about the ffmpeg-cvslog mailing list