From 972ed724f5111ec971e9cfce33094495b1eefbc5 Mon Sep 17 00:00:00 2001 From: Serris Lew Date: Mon, 11 Sep 2023 14:10:19 -0700 Subject: [PATCH] Coverity 1518564: fix off by one --- plugins/experimental/fq_pacing/fq_pacing.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/experimental/fq_pacing/fq_pacing.cc b/plugins/experimental/fq_pacing/fq_pacing.cc index 68663485f9b..c91cea4b83a 100644 --- a/plugins/experimental/fq_pacing/fq_pacing.cc +++ b/plugins/experimental/fq_pacing/fq_pacing.cc @@ -64,7 +64,7 @@ fq_is_default_qdisc() return 0; } - s = TSfread(f, buffer, sizeof(buffer)); + s = TSfread(f, buffer, sizeof(buffer) - 1); if (s > 0) { buffer[s] = 0; } else {