Commit 051431cd authored by Thomas Guillem's avatar Thomas Guillem Committed by Rémi Denis-Courmont

objes: use multiplication overflow helper

parent aebbbf02
......@@ -136,9 +136,8 @@ static bool ptrcmp(void *a, void *b)
static void *vlc_obj_alloc_common(vlc_object_t *obj, size_t nmemb, size_t size,
bool do_memset)
{
size_t tabsize = nmemb * size;
if (unlikely(tabsize < nmemb))
size_t tabsize;
if (mul_overflow(nmemb, size, &tabsize))
{
errno = ENOMEM;
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment