0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 7.4.1616

Problem:    Malformed channel request causes a hang.
Solution:   Drop malformed message. (Damien)
This commit is contained in:
Bram Moolenaar
2016-03-20 14:31:00 +01:00
parent 829c8e3696
commit ac74d5e86c
4 changed files with 34 additions and 10 deletions

View File

@@ -104,6 +104,11 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
print("sending: {}".format(cmd))
self.request.sendall(cmd.encode('utf-8'))
response = "ok"
elif decoded[1] == 'malformed':
cmd = '["ex",":"]wrong!["ex","smi"]'
print("sending: {}".format(cmd))
self.request.sendall(cmd.encode('utf-8'))
response = "ok"
elif decoded[1] == 'an expr':
# Send an expr request.
cmd = '["expr","setline(\\"$\\", [\\"one\\",\\"two\\",\\"three\\"])"]'