From cba2fb7cebb3cd839332560bdd983a3712d67bef Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Thu, 11 May 2023 15:22:46 +0100 Subject: [PATCH] Fix a memory corruption issue --- containers/aligned_vector.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/containers/aligned_vector.h b/containers/aligned_vector.h index be62f6c..d5f361a 100644 --- a/containers/aligned_vector.h +++ b/containers/aligned_vector.h @@ -4,6 +4,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -128,6 +129,7 @@ AV_FORCE_INLINE void* aligned_vector_resize(AlignedVector* vector, const unsigne ret = aligned_vector_at(vector, previousCount); } else { vector->size = element_count; + ret = aligned_vector_at(vector, previousCount); } return ret;