From bc22b4454909f76bb77e1bdae90f2719ac7e9820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sun, 3 May 2026 19:34:51 +0200 Subject: [PATCH] Replace strnlen calls Non-C-standard strnlen is not available on Mac OS X 10.5 --- librz/bin/format/elf/elf_info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/librz/bin/format/elf/elf_info.c b/librz/bin/format/elf/elf_info.c index b27f5132af..9ece2c5abe 100644 --- a/librz/bin/format/elf/elf_info.c +++ b/librz/bin/format/elf/elf_info.c @@ -1243,7 +1243,7 @@ static const ut8 *parse_arm_attribute(const ut8 *data, ut32 size, arm_attribute_ case TAG_CPU_RAW_NAME: // generic compatibility tag case TAG_COMPATIBILITY: - n = strnlen((const char *)attribute_value_data, attribute_value_size); + n = rz_str_nlen((const char *)attribute_value_data, attribute_value_size); if (n < attribute_value_size) { attribute->value_str = (char *)attribute_value_data; return attribute_value_data + n + 1; // including terminating null byte @@ -1258,7 +1258,7 @@ static const ut8 *parse_arm_attribute(const ut8 *data, ut32 size, arm_attribute_ } if (attribute->tag & 1) { - n = strnlen((const char *)attribute_value_data, attribute_value_size); + n = rz_str_nlen((const char *)attribute_value_data, attribute_value_size); if (n < attribute_value_size) { attribute->value_str = (char *)attribute_value_data; return attribute_value_data + n + 1; // including terminating null byte