On Sun, Nov 9, 2014 at 3:11 PM, Luca Barbato <[email protected]> wrote:
> CC: [email protected]
> ---
>  libavcodec/tiffenc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
> index 93c151e..b28f72b 100644
> --- a/libavcodec/tiffenc.c
> +++ b/libavcodec/tiffenc.c
> @@ -312,8 +312,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
> *pkt,
>      offset = ptr;
>      bytestream_put_le32(&ptr, 0);
>
> -    strip_sizes   = av_mallocz(sizeof(*strip_sizes)   * strips);
> -    strip_offsets = av_mallocz(sizeof(*strip_offsets) * strips);
> +    strip_sizes   = av_mallocz_array(strips, sizeof(*strip_sizes));
> +    strip_offsets = av_mallocz_array(strips, sizeof(*strip_offsets));
>      if (!strip_sizes || !strip_offsets) {
>          ret = AVERROR(ENOMEM);
>          goto fail;

Looks ok, feel free to address the one on line 340 if you think it makes sense.
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to