fix buffer overflow in test utility
@@ -34,7 +34,12 @@ void probe_system_w_ctx(
test_assert(it->entities == e);
for (i = 0; i < it->count; i ++) {
+ if (i + ctx->count < 256) {
ctx->e[i + ctx->count] = e[i];
+ } else {
+ /* can't store more than that, tests shouldn't rely on
+ * getting back more than 256 results */
+ }
}
ctx->count += it->count;
}
