diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-11-17 11:02:35 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-11-17 11:02:35 -0800 |
commit | 8d08bb2d2251ad282d020c6a136238cb314bbe60 (patch) | |
tree | 57fa29adf8893dbddeaff54f14018c40b50fd4fa | |
parent | 2c906e138333daf9e0f2186aa310ff42667f8ca6 (diff) |
rstartd.real: Avoid buffer overflow reading from config file
Fixes: 20978_58 from https://cyber-itl.org/2020/10/28/citl-7000-defects.html
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | server.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -205,6 +205,11 @@ get_a_line(FILE *f, int *pargc, char ***pargv) case EOF: return FALSE; default: + if (p >= (buf + sizeof(buf) - 2)) { + printf("%s: Failure: line too long\n", + myname); + exit(255); + } *p++ = c; break; } |