From b83a9d5f9a93d6b01d4b06429195e4508377504c Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Tue, 11 Oct 2022 11:06:58 +0200 Subject: [PATCH] Limited value must never go under zero --- nest/limit.h | 1 + 1 file changed, 1 insertion(+) diff --git a/nest/limit.h b/nest/limit.h index 5838ad3b..f8d4b212 100644 --- a/nest/limit.h +++ b/nest/limit.h @@ -32,6 +32,7 @@ static inline int limit_push(struct limit *l, void *data) static inline void limit_pop(struct limit *l) { + ASSERT_DIE(l->count > 0); --l->count; }