From 9cd5742bec56aa43267fabf4346b0f061dd3d151 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 6 Apr 2007 08:24:48 +0000 Subject: strcpy is bad --- src/librc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/librc.c b/src/librc.c index 8e8f4ea5..e6b16820 100644 --- a/src/librc.c +++ b/src/librc.c @@ -86,7 +86,7 @@ char *rc_get_runlevel (void) if (! (fp = fopen (SOFTLEVEL, "r"))) { - strcpy (buffer, "sysinit"); + snprintf (buffer, sizeof (buffer), "sysinit"); return (buffer); } @@ -100,7 +100,7 @@ char *rc_get_runlevel (void) } fclose (fp); - strcpy (buffer, "sysinit"); + snprintf (buffer, sizeof (buffer), "sysinit"); return (buffer); } -- cgit v1.2.3