gssapi: Fix ordering logic in _gssapi_msg_order_check

A typo in _gssapi_msg_order_check means that sequence numbers
received out of sequence are not correctly added to the internal
order array.
This commit is contained in:
Simon Wilkinson
2024-06-15 09:35:05 +01:00
committed by Jeffrey Altman
parent 05e292e1af
commit 2f7a9d9530

View File

@@ -188,7 +188,7 @@ _gssapi_msg_order_check(struct gss_msg_order *o, OM_uint32 seq_num)
for (i = 0; i < o->length - 1; i++) {
if (o->elem[i] == seq_num)
return GSS_S_DUPLICATE_TOKEN;
if (o->elem[i + 1] < seq_num && o->elem[i] < seq_num) {
if (o->elem[i + 1] < seq_num && o->elem[i] > seq_num) {
elem_insert(o, i, seq_num);
if (r)
return GSS_S_COMPLETE;