CSIEscape, STREscape: use size_t for buffer length