Add error messages for un/pack buffer overflow

Previously most buffer overflows would return an error, but not
indicate exactly what happened.