Other |
---|
tbdUnresolved |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Uses of strncpy sometimes trigger gcc warning -Wstringop-truncation. Some have been correct warnings, some have been false positives. It may also be that some uses aren't being warned about but should be, because strncpy can be tricky to use properly. The places where the warnings occur has varied between gcc versions. Rather than responding to a different set of complaints from different versions of gcc, we should consider adding os::strncpy_s, modelled on the corresponding C11 function, and replacing uses of strncpy with uses of that function. [Later: A possibly better choice is strscpy; see comments.] gcc metabug for -Wstringop-truncation bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88781
|