On Fri, Mar 28, 2014 at 04:41:48PM +0530, Nidhi Makhijani wrote:
> ---
>  libavformat/rdt.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

rdt: Check malloc() calls

> --- 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 target;
>      av_base64_decode(target, p, *target_len);
>      return target;
> @@ -521,7 +523,8 @@ static PayloadContext *
>  {
>      PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
> -
> +    if (!rdt)
> +      return rdt;
>      int ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
>      if (ret < 0) {
>          av_free(rdt);

4 space indentation

otherwise LGTM

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

Reply via email to