Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-21 22:16:24 +0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-25 19:22:01 +0400
commit35f9d8c20a26a7d383d3d36796e64a4b8987d743 (patch)
treefabb216c5d1748d42248d9d6a8b4d48a3b5c9504 /libavcodec/tta.c
parent3d813e4c548c99368876f985a324eac689385311 (diff)
tta: check remaining bitstream size while reading unary value
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r--libavcodec/tta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 5a11436ca9..9330e2d549 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -182,7 +182,7 @@ static int tta_get_unary(GetBitContext *gb)
int ret = 0;
// count ones
- while(get_bits1(gb))
+ while (get_bits_left(gb) > 0 && get_bits1(gb))
ret++;
return ret;
}