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

Unified Diff: libavcodec/vp3.c

Issue 9373002: Fix valgrind and asan memory leaks and crashes. (Closed) Base URL: ssh://gerrit.chromium.org:29418/chromium/third_party/ffmpeg.git@master
Patch Set: Notes. Created 8 years, 10 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: libavcodec/vp3.c
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index b5daafcefb34d6050795643050735ef20560ca8e..807fc500677ad72ee8355e23068e6825024cd048 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1630,7 +1630,7 @@ static av_cold int allocate_tables(AVCodecContext *avctx)
s->superblock_coding = av_malloc(s->superblock_count);
s->all_fragments = av_malloc(s->fragment_count * sizeof(Vp3Fragment));
s->coded_fragment_list[0] = av_malloc(s->fragment_count * sizeof(int));
- s->dct_tokens_base = av_malloc(64*s->fragment_count * sizeof(*s->dct_tokens_base));
+ s->dct_tokens_base = av_mallocz(64*s->fragment_count * sizeof(*s->dct_tokens_base));
s->motion_val[0] = av_malloc(y_fragment_count * sizeof(*s->motion_val[0]));
s->motion_val[1] = av_malloc(c_fragment_count * sizeof(*s->motion_val[1]));

Powered by Google App Engine
This is Rietveld 408576698