From: Alan T. DeKok Date: Tue, 2 Dec 2025 17:25:29 +0000 (-0500) Subject: check limits on the data. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fff5d745fca1e5c48b0e5037677f509fd3ddd2f7;p=thirdparty%2Ffreeradius-server.git check limits on the data. to catch the corner case of the encoder returning unrealistic amounts of data --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index 9294eb427fb..6797d6d03bf 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -449,6 +449,8 @@ static inline CC_HINT(nonnull) int dump_fuzzer_data(int fd_dir, char const *text char digest_str[(SHA1_DIGEST_LENGTH * 2) + 1]; int file_fd; + fr_assert(data_len <= COMMAND_OUTPUT_MAX); + fr_sha1_init(&ctx); fr_sha1_update(&ctx, (uint8_t const *)text, strlen(text)); fr_sha1_final(digest, &ctx);