fixing longjmps & buffer sizing