Fix buffer overflow in ARRAY _pop_at function (reported by tyrone718)

This commit is contained in:
Patrick Pelissier committed 2021-09-18 09:52:33 +02:00
1 parent 2178dcfcab
commit 39eeb3aec7
2 files changed
+16 -1

No files matched your search

+1 -1
View File
@@ -553,7 +553,7 @@
M_DO_MOVE (oplist, *dest, v->ptr[i]); \
else \
M_CALL_CLEAR(oplist, v->ptr[i]); \
memmove(&v->ptr[i], &v->ptr[i+1], sizeof(type)*(v->size - i) ); \
memmove(&v->ptr[i], &v->ptr[i+1], sizeof(type)*(v->size-1-i)); \
v->size--; \
M_ARRA4_CONTRACT(v); \
} \