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

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: 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..e465df149b18887295927f605d559f2a705a7b30 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1631,6 +1631,7 @@ static av_cold int allocate_tables(AVCodecContext *avctx)
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));
+ memset(s->dct_tokens_base, 0, 64*s->fragment_count * sizeof(*s->dct_tokens_base));
rbultje1 2012/02/08 23:51:56 Use av_mallocz() instead of av_malloc() to zero it
DaleCurtis 2012/02/09 04:03:28 Done.
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]));
« no previous file with comments | « libavcodec/vorbisdec.c ('k') | libavformat/utils.c » ('j') | libavformat/utils.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698