diff --git a/src/CoreParser.php b/src/CoreParser.php index 6675bca..f5fe732 100644 --- a/src/CoreParser.php +++ b/src/CoreParser.php @@ -104,7 +104,7 @@ class CoreParser { $m->code = ord($payload[0]); $m->pub_key = base64_encode(substr($payload, 1, CoreProtocol::PUB_KEY_SIZE)); - if( strlen($payload) > CoreProtocol::PUB_KEY_SIZE ) { + if( strlen($payload) > CoreProtocol::PUB_KEY_SIZE + 2 ) { $m->type = ord($payload[33]); $m->flags = ord($payload[34]); $m->out_path = substr($payload, 35, CoreProtocol::MAX_PATH_SIZE);