[FFmpeg-devel] [PATCH]lavu/mem: Make alloc array functions more similar to av_malloc

Nicolas George george at nsup.org
Tue Apr 14 12:03:45 EEST 2020


Anton Khirnov (12020-04-14):
> IIUC some platforms had problems with malloc(0)
> Plus I don't think any valid code should ever malloc zero bytes, so my
> suggestion would be for all malloc wrappers to:
> - av_assert2(size > 0)
> - return NULL otherwise

I think this is a very good idea.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200414/a35f6661/attachment.sig>


More information about the ffmpeg-devel mailing list