X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Fmem.h;h=2f53b474ff65385760d53cdb1ff92fe291a8c5f7;hb=69630f4d304a4e35d90957d6a170744af87cbf93;hp=d25b3229b7ccbf0bfb0e3668f785cb1b5b860a3e;hpb=cd02df52567d417e3efeda8fbaa36a2753a0e0cf;p=ffmpeg diff --git a/libavutil/mem.h b/libavutil/mem.h index d25b3229b7c..2f53b474ff6 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -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) { size_t t = a * b; - /* Hack inspired from glibc: only try the division if nelem and elsize - * are both greater than sqrt(SIZE_MAX). */ + /* Hack inspired from glibc: don't try the division if nelem and elsize + * are both less than sqrt(SIZE_MAX). */ if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b) return AVERROR(EINVAL); *r = t;