You should probably put a sanity check somewhere so that you don't overflow your 2048char buffer.