On Mon, Dec 12, 2011 at 03:11:13PM +0530, Gaurav Narula wrote:
> ---
>  libavcodec/kmvc.c |   81 ++++++++++++++++++++++++++++++++++++++++++----------
>  1 files changed, 65 insertions(+), 16 deletions(-)
> 
> diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
> index 07ca194..3618fd8 100644
> --- a/libavcodec/kmvc.c
> +++ b/libavcodec/kmvc.c
> @@ -57,17 +57,20 @@ typedef struct BitBuf {
>  
>  #define kmvc_init_getbits(bb, src)  bb.bits = 7; bb.bitbuf = *src++;
>  
> -#define kmvc_getbit(bb, src, res) {\
> +#define kmvc_getbit(bb, src, src_end, res) {\
>      res = 0; \
>      if (bb.bitbuf & (1 << bb.bits)) res = 1; \
>      bb.bits--; \
>      if(bb.bits == -1) { \
> +        if (src >= src_end) { \
> +            av_log(ctx->avctx, AV_LOG_ERROR, "Data overrun\n"); return 
> AVERROR_INVALIDDATA; \

split it into two lines please

the rest LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to