# HG changeset patch # User vitor # Date 1242553692 0 # Node ID 041c635d0f691ede7775fbd638401ce56d7d05ac # Parent 34be4ff863023fcea82921ae4af94dc302807ef6 Make TMV decoder check packet sizes before reading from it. FATE test 295 might need updating. diff -r 34be4ff86302 -r 041c635d0f69 tmv.c --- a/tmv.c Sun May 17 09:09:07 2009 +0000 +++ b/tmv.c Sun May 17 09:48:12 2009 +0000 @@ -52,6 +52,13 @@ return -1; } + if (avpkt->size < 2*char_rows*char_cols) { + av_log(avctx, AV_LOG_ERROR, + "Input buffer too small, truncated sample?\n"); + *data_size = 0; + return -1; + } + tmv->pic.pict_type = FF_I_TYPE; tmv->pic.key_frame = 1; dst = tmv->pic.data[0];