From fa059e586e75983e6a3705a63fc0248253e2713d Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Fri, 26 Dec 2025 11:00:21 -0500 Subject: [PATCH] check length of extend_lowat --- src/lib/util/sbuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/util/sbuff.h b/src/lib/util/sbuff.h index ed6def0746f..7ce46ff349a 100644 --- a/src/lib/util/sbuff.h +++ b/src/lib/util/sbuff.h @@ -1769,7 +1769,7 @@ static inline bool fr_sbuff_is_in_charset(fr_sbuff_t *sbuff, bool const chars[st static inline bool fr_sbuff_is_str(fr_sbuff_t *sbuff, char const *str, size_t len) { if (len == SIZE_MAX) len = strlen(str); - if (!fr_sbuff_extend_lowat(NULL, sbuff, len)) return false; + if (fr_sbuff_extend_lowat(NULL, sbuff, len) < len) return false; return memcmp(sbuff->p, str, len) == 0; } #define fr_sbuff_is_str_literal(_sbuff, _str) fr_sbuff_is_str(_sbuff, _str, sizeof(_str) - 1) -- 2.47.3