avcodec/huffyuvenc: fail if stats_out is too small instead of silently truncating

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/55/head
Michael Niedermayer 11 years ago
parent bc11b2c3e6
commit a301bb63f0
  1. 2
      libavcodec/huffyuvenc.c

@ -947,6 +947,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
snprintf(p, end-p, "\n");
p++;
if (end <= p)
return AVERROR(ENOMEM);
}
} else
avctx->stats_out[0] = '\0';

Loading…
Cancel
Save