[CLOSED] [all] Replace all unsafe C functions
Closed this issue · 1 comments
lerwys commented
Issue by lerwys
Monday Mar 16, 2015 at 03:13 GMT
Originally opened as lnls-dig/bpm-sw#84
Problems: There are some uses of unsafe C functions like strcat () and strcpy () on the code, which could lead to bugs.
Solution: Replace the unsafe functions by its safe counterparts, like strncat () and strncpy ()
lerwys commented
Comment by lerwys
Friday Apr 10, 2015 at 17:24 GMT
Actually, this is wrong. We should use something else for this. strlcpy () should be a little better for this, but it's not very standard. So, we we should use a slower (much slower for small strings, apparently) function like snprintf () for now.