Hmm, an overflow of uint32_t could be checked here... but sending GIGABYTES of elements? It should be done in more generic way, not only in string serialization. It's a matter of another task.