diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2013-02-27 15:32:27 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2013-02-27 15:32:27 -0800 |
commit | f493a00c1173fd7b15018639fe77fcfdd7787200 (patch) | |
tree | 09f7244828228d654acd6fc66d8b8ba1119d18ca | |
parent | ac9370d3e0e4a645f893028c9dee0ece20c4f0d3 (diff) | |
parent | 37d0247301cafe1cf683cc7b3edb95dc6b30caac (diff) |
Merge branch 'master' of github.com:paramiko/paramiko
-rw-r--r-- | paramiko/message.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/paramiko/message.py b/paramiko/message.py index 366c43c9..47acc34b 100644 --- a/paramiko/message.py +++ b/paramiko/message.py @@ -110,7 +110,8 @@ class Message (object): @rtype: string """ b = self.packet.read(n) - if len(b) < n: + max_pad_size = 1<<20 # Limit padding to 1 MB + if len(b) < n and n < max_pad_size: return b + '\x00' * (n - len(b)) return b |