1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-12 22:53:24 +00:00

Socat address parser read over end of string when there was unbalanced quoting

This commit is contained in:
Gerhard Rieger 2020-10-13 19:25:21 +02:00
parent 8e6b341f59
commit b62ff0c005
4 changed files with 43 additions and 1 deletions

View file

@ -159,6 +159,7 @@ static int _nestlex(const char **addr,
if (result == 0 && dropquotes) {
/* we strip the trailing quote */
if (!in[0] || strncmp(in, *quotx, strlen(*quotx))) return 1;
in += strlen(*quotx);
} else if (result < 0) {
*addr = in; *token = out; return result;