From 583378853a0d5f35e5d4515b278b79c528393d43 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 31 Dec 2024 11:23:56 +0900 Subject: [PATCH] nghttp3_gaptr: Assert !nghttp3_ksl_it_end Assert !nghttp3_ksl_it_end in nghttp3_gaptr_is_pushed just like we do in the other functions --- lib/nghttp3_gaptr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/nghttp3_gaptr.c b/lib/nghttp3_gaptr.c index 8ed5185..e8ab509 100644 --- a/lib/nghttp3_gaptr.c +++ b/lib/nghttp3_gaptr.c @@ -152,6 +152,9 @@ int nghttp3_gaptr_is_pushed(nghttp3_gaptr *gaptr, uint64_t offset, it = nghttp3_ksl_lower_bound_search(&gaptr->gap, &q, nghttp3_ksl_range_exclusive_search); + + assert(!nghttp3_ksl_it_end(&it)); + m = nghttp3_range_intersect(&q, (nghttp3_range *)nghttp3_ksl_it_key(&it)); return nghttp3_range_len(&m) == 0;