Changeset - 5002dce4a922
[Not reviewed]
0 1 0
moyamo - 10 years ago 2015-10-09 18:53:52
moyamodehacker@gmail.com
Prevent python plugin from crashing with InvalidWireType exception

Too much data was passed to wrapper.parseFromString resulting in it
trying to read another tag even after the WrapperMessage has ended
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
plugin/python/NetworkPlugin.py
Show inline comments
 
@@ -319,7 +319,7 @@ class NetworkPlugin:
 
				return
 

	
 
			wrapper = protocol_pb2.WrapperMessage()
 
			if (wrapper.ParseFromString(self.m_data[4:]) == False):
 
			if (wrapper.ParseFromString(self.m_data[4:expected_size+4]) == False):
 
				self.m_data = self.m_data[expected_size+4:]
 
				return
 

	
0 comments (0 inline, 0 general)