Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On 03/10/2015 10:43 AM, Caolán McNamara wrote:
This is in the context of the  http://www.viva64.com/en/b/0308/#ID0ESAGK
section and these memset calls
http://www.viva64.com/external-pictures/txt/LibreOffice-V597.txt
Or should we just use c++11's memset_s in these places ?

(And persumably either way, have rtl_freeZeroMemory call that instead of
memset ?)

memset_s is a bit hairy, as it is C11 but not C++11, and conditional in C11 on __STDC_LIB_EXT1__, effectively requiring every include of any standard library header in the compilation unit to see __STDC_WANT_LIB_EXT1__ defined to 1. So it looks like wrapping it in some rtl_secureZeroMemory abstraction looks like a good idea.

A nice approach would be to restrict this to rtl_freeZeroMemory, but at least some of the places in LibreOffice-V597.txt use memset on e.g. stack-allocated memory, so making rtl_secureZeroMemory available in addition to rtl_freeZeroMemory seems to be needed.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.