From: Hugo Landau Date: Mon, 27 Nov 2023 07:52:24 +0000 (+0000) Subject: Make bitmask table read only X-Git-Tag: openssl-3.3.0-alpha1~565 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a87b6d1377e7b18ec17edf0f34d5cd797ce947c5;p=thirdparty%2Fopenssl.git Make bitmask table read only Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/22828) --- diff --git a/ssl/statem/statem_dtls.c b/ssl/statem/statem_dtls.c index c674ddfb54d..166e2075a4f 100644 --- a/ssl/statem/statem_dtls.c +++ b/ssl/statem/statem_dtls.c @@ -39,9 +39,9 @@ if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; ii >= 0 ; ii--) \ if (bitmask[ii] != 0xff) { is_complete = 0; break; } } -static unsigned char bitmask_start_values[] = +static const unsigned char bitmask_start_values[] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80 }; -static unsigned char bitmask_end_values[] = +static const unsigned char bitmask_end_values[] = { 0xff, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f }; static void dtls1_fix_message_header(SSL_CONNECTION *s, size_t frag_off,