[FFmpeg-devel] [PATCH]lavu/mem: Make alloc array functions more similar to av_malloc
Michael Niedermayer
michael at niedermayer.cc
Sun Apr 5 15:03:05 EEST 2020
On Sat, Apr 04, 2020 at 12:46:36AM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch makes the alloc array functions more similar to
> av_malloc, depending on max_alloc_size instead of INT_MAX.
>
> Allows a work-around for ticket #7140
>
> Please comment, Carl Eugen
> mem.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 507531ed6f0932834d005bc1dd7d18e762f158b2 0001-lavu-mem-Make-alloc-array-functions-more-similar-to-.patch
> From 7ae240a9f7885130251031aba5d0764b11947fec Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <ceffmpeg at gmail.com>
> Date: Sat, 4 Apr 2020 00:37:03 +0200
> Subject: [PATCH] lavu/mem: Make alloc array functions more similar to
> av_malloc().
>
> Do not limit the array allocation functions to allocations of INT_MAX,
> instead depend on max_alloc_size like av_malloc().
>
> Allows a workaround for ticket #7140.
> ---
> libavutil/mem.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
av_size_mult() may be faster
also we possibly should check somewhere for SIZE_MAX < INT_MAX
for example in configure if we do not support such an oddity
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200405/df048a58/attachment.sig>
More information about the ffmpeg-devel
mailing list