changed latex cml env input stream to use calculated buffer size