Handle snprintf() returning < -1.
This commit is contained in:
parent
1a9e5ae59a
commit
5ba6edf189
@ -555,7 +555,7 @@ fatal(f, msg, syserr)
|
||||
msg, strerror(errno));
|
||||
else
|
||||
len = snprintf(bp, sizeof(buf), "rlogind: %s.\r\n", msg);
|
||||
if (len == -1)
|
||||
if (len < 0)
|
||||
len = 0;
|
||||
(void) write(f, buf, bp + len - buf);
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user