Fix some issues detected by fuzzer
If we fail to unserialize data we need to reset data to avoid invalid state. We can accept data only if we had data (data_len > 0), otherwise reset it.
This also fixes #21 (closed).
Signed-off-by: Frediano Ziglio freddy77@gmail.com