Check header length unserialising data
Avoid unwanted packets. The test for header length is moved outside the if. If the header is not complete the number will contain 0 bytes so a smaller number. This avoids potential excessive allocations if the header length is very high.
Signed-off-by: Frediano Ziglio freddy77@gmail.com