strcpy is bad
This commit is contained in:
parent
0762d88d84
commit
9cd5742bec
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user