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

Unified Diff: libavcodec/vp8.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: Make vp3 fix an ignore. 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
« no previous file with comments | « libavcodec/vp3.c ('k') | libavformat/mov.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libavcodec/vp8.c
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 4728393d105a56b50172950925c884cf0796692a..b23dae4c09dd5106a3a79f7b6cb2937e8d9c7e1b 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -124,7 +124,7 @@ static int update_dimensions(VP8Context *s, int width, int height)
s->macroblocks_base = av_mallocz((s->mb_width+s->mb_height*2+1)*sizeof(*s->macroblocks));
s->filter_strength = av_mallocz(s->mb_width*sizeof(*s->filter_strength));
s->intra4x4_pred_mode_top = av_mallocz(s->mb_width*4);
- s->top_nnz = av_mallocz(s->mb_width*sizeof(*s->top_nnz));
+ s->top_nnz = av_mallocz((s->mb_width+1)*sizeof(*s->top_nnz));
s->top_border = av_mallocz((s->mb_width+1)*sizeof(*s->top_border));
if (!s->macroblocks_base || !s->filter_strength || !s->intra4x4_pred_mode_top ||
« no previous file with comments | « libavcodec/vp3.c ('k') | libavformat/mov.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698