diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-25 09:11:03 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-25 09:11:03 +0000 |
commit | c2bdd02a7eec1135cef3ddd6fdc3269a775e544e (patch) | |
tree | ed29df48776d230e00a4e07eeac5fca8955ce494 /lib/libc/regex/engine.c | |
parent | da8f4ecf268cdf594ae61878f9754ef93b6aa5d7 (diff) |
remaining easy snprintf conversions
Diffstat (limited to 'lib/libc/regex/engine.c')
-rw-r--r-- | lib/libc/regex/engine.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index d5f0d2f3e84..c272093217d 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.5 2002/02/16 21:27:24 millert Exp $ */ +/* $OpenBSD: engine.c,v 1.6 2002/05/25 09:11:02 deraadt Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. @@ -40,7 +40,7 @@ */ #if defined(SNAMES) && defined(LIBC_SCCS) && !defined(lint) -static char enginercsid[] = "$OpenBSD: engine.c,v 1.5 2002/02/16 21:27:24 millert Exp $"; +static char enginercsid[] = "$OpenBSD: engine.c,v 1.6 2002/05/25 09:11:02 deraadt Exp $"; #endif /* SNAMES and LIBC_SCCS and not lint */ /* @@ -1078,9 +1078,9 @@ int ch; static char pbuf[10]; if (isprint(ch) || ch == ' ') - (void)sprintf(pbuf, "%c", ch); + (void)snprintf(pbuf, sizeof pbuf, "%c", ch); else - (void)sprintf(pbuf, "\\%o", ch); + (void)snprintf(pbuf, sizeof pbuf, "\\%o", ch); return(pbuf); } #endif |