On Thu, 22 May 2014 20:56:09 +0530, Nidhi Makhijani <[email protected]> wrote:
> ---
>  libavformat/rdt.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/libavformat/rdt.c b/libavformat/rdt.c
> index a8c7015..4953f67 100644
> --- a/libavformat/rdt.c
> +++ b/libavformat/rdt.c
> @@ -399,6 +399,8 @@ rdt_parse_b64buf (unsigned int *target_len, const char *p)
>      }
>      *target_len = len * 3 / 4;
>      target = av_mallocz(*target_len + FF_INPUT_BUFFER_PADDING_SIZE);
> +    if (!target)
> +       return NULL;
>      av_base64_decode(target, p, *target_len);
>      return target;
>  }
> @@ -525,6 +527,8 @@ rdt_new_context (void)
>      PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
>  
>      int ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
> +    if (!rdt)
> +        return NULL;

This check is too late, rdt is already accessed right above.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to