Merge pull request #66 from moyamo/master

Prevent python plugin from crashing with InvalidWireType exception
This commit is contained in:
vitalyster 2015-10-10 18:11:20 +03:00
commit 43d2022093

View file

@ -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