am f2282b3c: Add some "fuzzing" tests for deserialization, and fixes for all of the problems discovered.

* commit 'f2282b3c6690ccfaa7878886f01693ef4f0b3bed':
  Add some "fuzzing" tests for deserialization, and fixes for all of the problems discovered.