1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-21 19:31:17 +03:00

config: fix buffer underflow with unrecognized opcodes

This commit is contained in:
Aris Adamantiadis
2017-06-08 00:22:02 +02:00
parent b0c2ca1b66
commit 0cffb88b80

View File

@@ -218,7 +218,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
} }
opcode = ssh_config_get_opcode(keyword); opcode = ssh_config_get_opcode(keyword);
if (*parsing == 1 && opcode != SOC_HOST) { if (*parsing == 1 && opcode != SOC_HOST && opcode != SOC_UNSUPPORTED) {
if (seen[opcode] != 0) { if (seen[opcode] != 0) {
return 0; return 0;
} }