3 ms·
It does not. Almost all memset_s implementations are broken, just mine not. memset_s just ensures that the unsane compiler will not optimize it away, whilst it
by rurban 5y ago
It does not. Almost all memset_s implementations are broken, just mine not. memset_s just ensures that the unsane compiler will not optimize it away, whilst it should also ensure that is fenced. Otherwise you can still read the memory from the cache.
Calling the ordinary memset_s secure is a bug, it's a mere convenience function.
- dagenix 5y agoI don't follow - how do memory fences make a meaningful difference in security?