summaryrefslogtreecommitdiffstats
path: root/ssl/quic/uint_set.c
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-07-27 15:55:34 +0100
committerHugo Landau <hlandau@openssl.org>2023-08-10 18:19:50 +0100
commitdc5e5c51e2ffa8e6f472eeb13efea3b3e113a6d1 (patch)
treed5d57d295a2da1a8a7ef7daa851457f5c7f34c98 /ssl/quic/uint_set.c
parentec2b45f59bda565bc1b8525ab8d508325dc612de (diff)
QUIC UINT_SET: Fix regression after list refactor
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
Diffstat (limited to 'ssl/quic/uint_set.c')
-rw-r--r--ssl/quic/uint_set.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssl/quic/uint_set.c b/ssl/quic/uint_set.c
index 9d0440b423..3bcfdcafd0 100644
--- a/ssl/quic/uint_set.c
+++ b/ssl/quic/uint_set.c
@@ -277,7 +277,7 @@ int ossl_uint_set_remove(UINT_SET *s, const UINT_RANGE *range)
*/
ossl_list_uint_set_remove(s, z);
OPENSSL_free(z);
- } else if (start <= z->range.start) {
+ } else if (start <= z->range.start && end >= z->range.start) {
/*
* The range being removed includes start of this range, but does
* not cover the entire range (as this would be caught by the case
@@ -303,6 +303,7 @@ int ossl_uint_set_remove(UINT_SET *s, const UINT_RANGE *range)
*/
y = create_set_item(end + 1, z->range.end);
ossl_list_uint_set_insert_after(s, z, y);
+ z->range.end = start - 1;
break;
} else {
/* Assert no partial overlap; all cases should be covered above. */
@@ -310,7 +311,7 @@ int ossl_uint_set_remove(UINT_SET *s, const UINT_RANGE *range)
}
}
- return 1;
+ return 1;
}
int ossl_uint_set_query(const UINT_SET *s, uint64_t v)