4 ms·
I'm not a C programmer, but even I knew that strlcpy() and snprintf() would come up in this discussion. How fucked up is that? Is there a resource where these
by MrBuddyCasino 11y ago
I'm not a C programmer, but even I knew that strlcpy() and snprintf() would come up in this discussion. How fucked up is that?
Is there a resource where these issues are answered once and for all, for the novice C programmer? Also, are there deprecation warnings emitted by the compiler for non-safe C stdlib functions?
- clarry 11y agoOn OpenBSD the linker whines about uses of unsafe functions. I don't see it becoming mainstream though, as there are so many people who disagree about what's unsafe.
- lawl 11y agoNot a C programmer either. But I've seen projects banning strcpy. The code was littered with strncpy(a, b, strlen(b)). So I'm not sure how useful these warnings would be.