From 28e254637c8f3076ff25520e3c2eea848f0bf654 Mon Sep 17 00:00:00 2001 From: Denis Feklushkin Date: Sun, 27 Sep 2026 03:04:06 +0300 Subject: [PATCH] container.array: fix out-of-bounds read in removeKey --- dlib/container/array.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlib/container/array.d b/dlib/container/array.d index b496b73e..67d881d1 100644 --- a/dlib/container/array.d +++ b/dlib/container/array.d @@ -501,7 +501,7 @@ struct Array(T, size_t chunkSize = 32) if (i < pos) { T* s = storage(); - for (size_t p = i+1; p <= pos; p++) + for (size_t p = i+1; p < pos; p++) { s[p-1] = s[p]; }