diff options
author | Roy Marples <roy@marples.name> | 2007-04-06 08:24:48 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-04-06 08:24:48 +0000 |
commit | 9cd5742bec56aa43267fabf4346b0f061dd3d151 (patch) | |
tree | 5e6fed460c97b219421b0790bee083f7f1b61336 /src | |
parent | 0762d88d843bb369ae98e5083dc19807e7e57df5 (diff) |
strcpy is bad
Diffstat (limited to 'src')
-rw-r--r-- | src/librc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |