facebook/presto — pull request #2024 by martint (2014-11-26 23:41:00+00:00)
Title: Fix IndexOutOfBounds error when deserializing max_by aggregation state

It happens because deserialize mistakenly reads the length from the first
position in the block regardless of which position is being deserialized.

If the length of the first position is longer than the length of the current
position, the code tries to read beyond the end of the buffer.