diff options
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r-- | src/binary-writer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc index 2117c8e5..172fc9fc 100644 --- a/src/binary-writer.cc +++ b/src/binary-writer.cc @@ -626,8 +626,8 @@ static void write_global_header(Context* ctx, const WabtGlobal* global) { static void write_reloc_section(Context* ctx, RelocSection* reloc_section) { char section_name[128]; - sprintf(section_name, "%s.%s", WABT_BINARY_SECTION_RELOC, - reloc_section->name); + wabt_snprintf(section_name, sizeof(section_name), "%s.%s", + WABT_BINARY_SECTION_RELOC, reloc_section->name); begin_custom_section(ctx, section_name, LEB_SECTION_SIZE_GUESS); wabt_write_u32_leb128(&ctx->stream, reloc_section->section_code, "reloc section type"); |