diff --git a/src/options.c b/src/options.c index e9c576399..f3e7c3fdd 100644 --- a/src/options.c +++ b/src/options.c @@ -3033,8 +3033,8 @@ optfn_paranoid_confirmation( " %s", paranoia[i].argname); } /* note: always leaves enough room for caller to tack on '\n' */ - opts[0] = '\0'; - (void) strncat(opts, tmpbuf[0] ? &tmpbuf[1] : "none", BUFSZ - 1); + Snprintf(opts, BUFSZ - 1, "%s", + tmpbuf[0] ? &tmpbuf[1] : "none"); return optn_ok; } if (req == do_handler) { @@ -8965,9 +8965,10 @@ doset(void) /* changing options via menu by Per Liboriussen */ getlin(buf, abuf); if (abuf[0] == '\033') continue; - Sprintf(buf, "%s:", allopt[opt_indx].name); - (void) strncat(eos(buf), abuf, - (sizeof buf - 1 - strlen(buf))); + Snprintf(buf, sizeof buf, + "%s:%s", + allopt[opt_indx].name, + abuf); /* pass the buck */ (void) parseoptions(buf, FALSE, FALSE); }