Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Only msvc provides strcpy_s and they don’t conform to the standard. Other libcs don’t provide it. Ignore everything from Annex K and write your own wrappers around memcpy. You should always know the size of your buffers.


Ah that sucks. Guess C is just stuck like this for the long term. Writing your own functions is still the best advice :'(


on the plus side, c is good at writing your own functions




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: