strcpy is bad

This commit is contained in:
Roy Marples 2007-04-06 08:24:48 +00:00
parent 0762d88d84
commit 9cd5742bec

View File

@ -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);
}