Skip to content
Snippets Groups Projects
Commit 2adc919e authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Ensure line isn't valid is it's not read in parse_string()

Thus appears to have been the root cause of the infinite loop/memory
issue.  Basically, line was never replaced if it didn't match
^{[0-9]+}$ and didn't result in a number when passed to parseInt()
This resulted in an infinite loop that kept pushing zero-length
strings into an array.
parent 91539dcd
No related branches found
No related tags found
No related merge requests found
...@@ -716,6 +716,9 @@ function parse_command(line) ...@@ -716,6 +716,9 @@ function parse_command(line)
ret=client.socket.recv(len); ret=client.socket.recv(len);
line=client.socket.recvline(10240, 1800); line=client.socket.recvline(10240, 1800);
} }
else {
line = undefined;
}
return(ret); return(ret);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment