3 ms·
For C: strncpy(), strncat(), snprintf() (or the non-standard asprintf()), and fgets(), respectively. I believe pickle is a Python thing.
by nathell 13y ago
For C: strncpy(), strncat(), snprintf() (or the non-standard asprintf()), and fgets(), respectively. I believe pickle is a Python thing.
- sdfjkl 13y agoThe sa[fn]e alternative to pickling your objects is to write your data into a well defined file format and read it back with stringent input checks.
- rainforest 13y agoIt's worth noting that strncpy doesn't always null-terminate strings (on some platforms), so strlcpy is preferable.