Fix length of dev global variable

Since the ut_line field is not guarranteed to be null terminated, in
order to get a proper null terminated string, dev is required to have an
extra byte at the end.
This commit is contained in:
Petar Kapris 2020-12-18 14:51:21 +01:00
parent dbf40dbc53
commit fd6525652d

View file

@ -138,7 +138,7 @@ struct config_ent {
struct config_ent *config[MAXLINES + 1];
char errmsg[256];
char dev[sizeof(utmpp->ut_line)];
char dev[sizeof(utmpp->ut_line) + 1];
unsigned char limit_type;
int configline = 0;
int pending_reread = 0;