last: fix smatch warning
login-utils/last.c +447 ttyconv(11) error: buffer overflow '(arg)' 3 <= 3 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
d6d11fa5c6
commit
889f1215f6
|
@ -448,7 +448,7 @@ ttyconv(char *arg) {
|
|||
(void)strcpy(mval, "console");
|
||||
else {
|
||||
(void)strcpy(mval, "tty");
|
||||
(void)strcpy(mval + 3, arg);
|
||||
(void)strncpy(mval + 3, arg, 4);
|
||||
}
|
||||
return mval;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue