From a33b90573578c7ef1ecd0e18c6f8c42328b03b78 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sun, 15 Aug 2004 00:17:46 +0000 Subject: [PATCH] * stabs-dbgfmt.c (stabs_dbgfmt_generate_sections): snprintf is not portable; use strcpy/strcat instead. svn path=/trunk/yasm/; revision=1129 --- modules/dbgfmts/stabs/stabs-dbgfmt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/dbgfmts/stabs/stabs-dbgfmt.c b/modules/dbgfmts/stabs/stabs-dbgfmt.c index 25768824..4657341f 100644 --- a/modules/dbgfmts/stabs/stabs-dbgfmt.c +++ b/modules/dbgfmts/stabs/stabs-dbgfmt.c @@ -331,9 +331,9 @@ stabs_dbgfmt_generate_sections(yasm_section *sect, /*@null@*/ void *d) if (yasm__strcasecmp(sectname, ".text")==0) { char *str; const char *symname=yasm_symrec_get_name(info->firstsym); - size_t len = strlen(symname)+4; - str = yasm_xmalloc(len); - snprintf(str, len, "%s:F1", symname); + str = yasm_xmalloc(strlen(symname)+4); + strcpy(str, symname); + strcat(str, ":F1"); stabs_dbgfmt_append_stab(info, info->stab, stabs_dbgfmt_append_bcstr(info->stabstr, str), N_FUN, 0, info->firstsym, info->firstbc, 0); -- 2.40.0