Add a hueristic: if the string copy is "too long", fail an assert().
This is based on the premise that Open MPI doesn't do large string
copies. So if we see a dest_len that is over a certain threshhold
(currently set at 128K), this is likely a programmer error, and on
debug builds, we should fail an assert(). In production builds, it
will work just fine (assuming that it's not a programmer error).
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Do essentially the same thing as strncpy(3), but a) ensure to always
terminate the destination buffer with a \0, and b) do not \0-pad to
the right.
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>