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


Hello,

In sal/osl/unx/security.c, I noticed these:
    278 sal_Bool SAL_CALL osl_getHomeDir(oslSecurity Security, rtl_uString
**pustrDirectory)
    279 {
    280     sal_Bool bRet=sal_False;
    281     sal_Char pszDirectory[PATH_MAX];
    282 
    283     pszDirectory[0] = '\0';

    373 sal_Bool SAL_CALL osl_getConfigDir(oslSecurity Security, rtl_uString
**pustrDirectory)
    374 {
    375     sal_Bool bRet = sal_False;
    376     sal_Char pszDirectory[PATH_MAX];
    377 
    378     pszDirectory[0] = '\0';

I'm not sure but I think it doesn't put the rest of the array to 0.
Would memsetting to 0 the whole array be right (and possibly useful)?
What about this too ?
sal_Char pszDirectory[PATH_MAX] = ""; 
It compiles but I wonder if it would be ok for every env

Julien




--
View this message in context: 
http://nabble.documentfoundation.org/Using-memset-or-other-way-in-sal-osl-unx-security-c-tp4026020.html
Sent from the Dev mailing list archive at Nabble.com.

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.