From 02d893f8abaffa51ad61b0bb6ce67f55de5cd217 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 26 May 2024 23:54:50 +0200 Subject: [PATCH 06/11] port-qmi: fix array bound check There's an off-by-one error. --- src/mm-port-qmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mm-port-qmi.c b/src/mm-port-qmi.c index f3c64464a..38703bc20 100644 --- a/src/mm-port-qmi.c +++ b/src/mm-port-qmi.c @@ -1641,7 +1641,7 @@ check_data_format_combination (GTask *task) /* go on to the next supported combination */ for (++ctx->data_format_combination_i; - ctx->data_format_combination_i <= (gint)G_N_ELEMENTS (data_format_combinations); + ctx->data_format_combination_i < (gint)G_N_ELEMENTS (data_format_combinations); ctx->data_format_combination_i++) { const DataFormatCombination *combination; g_autofree gchar *kernel_data_mode_str = NULL; -- 2.45.2