2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

1458. [cleanup] sprintf() -> snprintf().

This commit is contained in:
Mark Andrews
2003-04-11 07:25:31 +00:00
parent 935000aa6e
commit 806c235ecf
16 changed files with 83 additions and 69 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: log.c,v 1.80 2002/11/29 01:42:18 marka Exp $ */
/* $Id: log.c,v 1.81 2003/04/11 07:25:28 marka Exp $ */
/* Principal Authors: DCL */
@@ -1492,18 +1492,19 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
if ((channel->flags & ISC_LOG_PRINTLEVEL) != 0 &&
level_string[0] == '\0') {
if (level < ISC_LOG_CRITICAL)
sprintf(level_string,
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_LOG,
ISC_MSG_LEVEL,
"level %d: "),
level);
snprintf(level_string, sizeof(level_string),
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_LOG,
ISC_MSG_LEVEL,
"level %d: "),
level);
else if (level > ISC_LOG_DYNAMIC)
sprintf(level_string, "%s %d: ",
log_level_strings[0], level);
snprintf(level_string, sizeof(level_string),
"%s %d: ", log_level_strings[0],
level);
else
sprintf(level_string, "%s: ",
log_level_strings[-level]);
snprintf(level_string, sizeof(level_string),
"%s: ", log_level_strings[-level]);
}
/*