3 ms·
> The politics referred to are because the annex is basically a bunch of Microsoft extensions pasted in the standard. So... M$FT bad, therefore anything they d
by colejohnson66 6y ago
> The politics referred to are because the annex is basically a bunch of Microsoft extensions pasted in the standard.
So... M$FT bad, therefore anything they do is bad? That makes no sense.
- pjmlp 6y agoBasically, almost no compiler vendor implemented it, they also had the issue that you still need to handle pointer and length as separated arguments. So instead of fixing the security issues, like having some struct based type, the whole annex was made optional, thus everyone that was against it, just doesn't offer any alternative.
- saagarjha 6y agoNo, it’s actually “this set of extensions Microsoft wrote is bad and they forced it into the standard”.
- pjmlp 6y agoStill waiting for the counter proposal from anyone else in WG14, though. Instead OS vendors seem to go via hardware memory tagging solutions, than keeping up a lost war, as we have discussed multiple times.
- a1369209993 6y ago> M$FT bad, therefore anything they do is bad That's backward; it's actually "anything [rather, most things] Microsoft does is bad, therefore Microsoft is bad". And (most of) Annex K is a example of that. (The strncpy/_s one is bit odd though, because strncpy was specifically for initializing a fixed-length buffer, which is not nul-terminated, but rather nul-padded. strncpy works fine for that purpose, although nobody uses nul-padded buffers anymore. Using it as a size-aware strcpy was always wrong; you should use strlen+memcpy or a separate str[lzc...]cpy (or strcpy_s I suppose) instead.)