Skip to content

Commit 4917ddb

Browse files
committed
fixup! fdc10e7
1 parent d704cda commit 4917ddb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static void reg_cb(const char* library_str,
3636
case symbol_function: {
3737
for (unsigned i = 0; i < param_count; i++) {
3838
snprintf(buffer, ARRAY_SIZE(buffer), (i == 0 ? "%s %s" : ", %s %s"), XbSymbolDatabase_ParamToString(param_list[i].type), param_list[i].name);
39-
size_t buffer_count = strlen(buffer);
39+
size_t buffer_count = strnlen(buffer, ARRAY_SIZE(buffer));
4040
if (param_size + buffer_count >= ARRAY_SIZE(param_output)) {
4141
printf("ERROR: param_size(%zu) + buffer_count(%zu) is too long to be stored in param_output(%zu)\n", param_size, buffer_count, ARRAY_SIZE(param_output));
4242
break;

0 commit comments

Comments
 (0)