Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: patched-ffmpeg-mt/libavcodec/tta.c

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: patched-ffmpeg-mt/libavcodec/tta.c
===================================================================
--- patched-ffmpeg-mt/libavcodec/tta.c (revision 41250)
+++ patched-ffmpeg-mt/libavcodec/tta.c (working copy)
@@ -332,9 +332,14 @@
unary--;
}
- if (k)
+ if (get_bits_left(&s->gb) < k)
+ return -1;
+
+ if (k) {
+ if (k > MIN_CACHE_BITS)
+ return -1;
value = (unary << k) + get_bits(&s->gb, k);
- else
+ } else
value = unary;
// FIXME: copy paste from original
@@ -404,6 +409,8 @@
}
}
+ if (get_bits_left(&s->gb) < 32)
+ return -1;
skip_bits(&s->gb, 32); // frame crc
// convert to output buffer

Powered by Google App Engine
This is Rietveld 408576698