
The packet was generated with the wrong number of elements due to usage of sizeof on an integer where the correct type was an uint8_t. This only fixes the malformed packets but does not fix the root cause of the problem. The affected rows and last insert ID are length encoded integers which should be handled. The current code treats them as one byte fields.