Re:Printable True Bugs Wait Posters
by nathell on Friday January 31, 2014 @08:31AM
(#7156533)
For C: strncpy(), strncat(), snprintf() (or the non-standard asprintf()), and fgets(), respectively. I believe pickle is a Python thing.
[ Parent
| on HN ]
The 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.
Re:Printable True Bugs Wait Posters
by rainforest on Friday January 31, 2014 @10:39AM
(#7157174)
It's worth noting that strncpy doesn't always null-terminate strings (on some platforms), so strlcpy is preferable.