Jiaxing Wang : regedit: Need 3 bytes of room at end of buffer for \r\n\0 to avoid endless loop.