Terminate string copied by strncpy() by '\0' to fix a core dump.
Submitted by: kogane@kces.koganemaru.co.jp (Nobuyuki Koganemaru)
This commit is contained in:
parent
827d45ce27
commit
67c347acbd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9376
@ -216,6 +216,7 @@ char **argv;
|
||||
if (cp[2] && cp[2] != '.')
|
||||
usage();
|
||||
strncpy(b1, cp, 2);
|
||||
b1[2] = '\0';
|
||||
addmac(b1);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user