avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Feb 2015 13:47:41 +0000 (14:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Feb 2015 14:08:32 +0000 (15:08 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 05e161952954acf247e0fd1fdef00559675c4d4d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpc8.c

index 6ef8cab..4352c78 100644 (file)
@@ -57,7 +57,7 @@ typedef struct {
 
 static inline int64_t bs_get_v(const uint8_t **bs)
 {
-    int64_t v = 0;
+    uint64_t v = 0;
     int br = 0;
     int c;
 
@@ -108,7 +108,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;