mirror of https://git.ffmpeg.org/ffmpeg.git
avutil/mem: fix wrong comment
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
daf421d2ab
commit
450cf400fc
|
@ -339,8 +339,8 @@ void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
|
||||||
static inline int av_size_mult(size_t a, size_t b, size_t *r)
|
static inline int av_size_mult(size_t a, size_t b, size_t *r)
|
||||||
{
|
{
|
||||||
size_t t = a * b;
|
size_t t = a * b;
|
||||||
/* Hack inspired from glibc: only try the division if nelem and elsize
|
/* Hack inspired from glibc: don't try the division if nelem and elsize
|
||||||
* are both greater than sqrt(SIZE_MAX). */
|
* are both less than sqrt(SIZE_MAX). */
|
||||||
if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
|
if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
*r = t;
|
*r = t;
|
||||||
|
|
Loading…
Reference in New Issue