[vlc-commits] [Git][videolan/vlc][master] vlc_array: use vlc_reallocarray for (re)allocation
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Thu Jul 13 08:33:14 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
e0e30060 by Steve Lhomme at 2023-07-13T08:12:42+00:00
vlc_array: use vlc_reallocarray for (re)allocation
- - - - -
1 changed file:
- include/vlc_arrays.h
Changes:
=====================================
include/vlc_arrays.h
=====================================
@@ -162,7 +162,7 @@ static inline void *realloc_or_free( void *p, size_t sz )
/* Internal functions */
#define _ARRAY_ALLOC(array, newsize) { \
(array).i_alloc = newsize; \
- (array).p_elems = realloc( (array).p_elems, (array).i_alloc * \
+ (array).p_elems = vlc_reallocarray( (array).p_elems, (array).i_alloc, \
sizeof(*(array).p_elems) ); \
if( !(array).p_elems ) abort(); \
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e0e300609a288cc6b74f4feaf8bc2ad9cfb9a373
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e0e300609a288cc6b74f4feaf8bc2ad9cfb9a373
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list