2018-10-16 14:15:19 -04:00
|
|
|
It does not handle the case for the unsupported opcode (-1)
|
2017-06-04 15:59:18 -04:00
|
|
|
which would cause a segfault when accessing the "seen" array.
|
|
|
|
|
|
|
|
diff --git a/src/config.c b/src/config.c
|
2018-10-16 14:15:19 -04:00
|
|
|
index c5313ec8..72e07639 100644
|
2017-06-04 15:59:18 -04:00
|
|
|
--- a/src/config.c
|
|
|
|
+++ b/src/config.c
|
2018-10-16 14:15:19 -04:00
|
|
|
@@ -218,7 +218,8 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
|
2017-06-04 15:59:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
opcode = ssh_config_get_opcode(keyword);
|
|
|
|
- if (*parsing == 1 && opcode != SOC_HOST) {
|
|
|
|
+ if (*parsing == 1 && opcode != SOC_HOST &&
|
|
|
|
+ opcode > SOC_UNSUPPORTED && opcode < SOC_END) {
|
2018-10-16 14:15:19 -04:00
|
|
|
if (seen[opcode] != 0) {
|
2017-06-04 15:59:18 -04:00
|
|
|
return 0;
|
|
|
|
}
|