Fix a bug where Parrot didn't check buffer size.

Fixes #235.
With Haiyan's help.