replace raw char[] with ffbuffer