diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-09-15 22:58:10 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-09-15 22:58:10 +0000 |
commit | 940b14abb425d608a4f941c7873f0656ac64b452 (patch) | |
tree | c940a773b08bfe9826ef12a6aa0e8ccad4edfc9e /bin/sh/mknodes.c | |
parent | 186adabdffcd89165bbd1c591f4081e23316cce3 (diff) |
sprintf -> snprintf paranoia
Diffstat (limited to 'bin/sh/mknodes.c')
-rw-r--r-- | bin/sh/mknodes.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/sh/mknodes.c b/bin/sh/mknodes.c index ddf3dc2b2e3..ef4cc33c706 100644 --- a/bin/sh/mknodes.c +++ b/bin/sh/mknodes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mknodes.c,v 1.2 1996/06/23 14:21:24 deraadt Exp $ */ +/* $OpenBSD: mknodes.c,v 1.3 1996/09/15 22:58:09 millert Exp $ */ /* $NetBSD: mknodes.c,v 1.11 1995/05/11 21:29:36 christos Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mknodes.c 8.2 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: mknodes.c,v 1.2 1996/06/23 14:21:24 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mknodes.c,v 1.3 1996/09/15 22:58:09 millert Exp $"; #endif #endif /* not lint */ @@ -187,16 +187,16 @@ parsefield() fp->name = savestr(name); if (strcmp(type, "nodeptr") == 0) { fp->type = T_NODE; - sprintf(decl, "union node *%s", name); + snprintf(decl, sizeof(decl), "union node *%s", name); } else if (strcmp(type, "nodelist") == 0) { fp->type = T_NODELIST; - sprintf(decl, "struct nodelist *%s", name); + snprintf(decl, sizeof(decl), "struct nodelist *%s", name); } else if (strcmp(type, "string") == 0) { fp->type = T_STRING; - sprintf(decl, "char *%s", name); + snprintf(decl, sizeof(decl), "char *%s", name); } else if (strcmp(type, "int") == 0) { fp->type = T_INT; - sprintf(decl, "int %s", name); + snprintf(decl, sizeof(decl), "int %s", name); } else if (strcmp(type, "other") == 0) { fp->type = T_OTHER; } else if (strcmp(type, "temp") == 0) { |