diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-31 10:20:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-31 13:38:01 +0100 |
commit | 026b17b7d725109f586622755b435ded3673c43a (patch) | |
tree | 685262a3a279833535f2b53584e311ce290aef83 /include/rtl | |
parent | 01b615687fe0f39c65e0e8290db434db2f1ef8ac (diff) |
V597: introduce a rtl_secureZeroMemory
Change-Id: Id28046eb318cd3b2ed0b813fd266617547cf6ee2
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/alloc.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/rtl/alloc.h b/include/rtl/alloc.h index 835db155ac44..bd3190d5f8c1 100644 --- a/include/rtl/alloc.h +++ b/include/rtl/alloc.h @@ -71,7 +71,6 @@ SAL_DLLPUBLIC void SAL_CALL rtl_freeMemory ( void * Ptr ) SAL_THROW_EXTERN_C(); - /** Allocate and zero memory. A call to this function will return NULL upon the requested @@ -84,18 +83,32 @@ SAL_DLLPUBLIC void * SAL_CALL rtl_allocateZeroMemory ( sal_Size Bytes ) SAL_THROW_EXTERN_C(); +/** Zero memory + + Fills a block of memory with zeros in a way that is guaranteed to be secure + + @param Ptr [in] pointer to previously allocated memory. + @param Bytes [in] memory size. + + @since LibreOffice 4.5 + */ +SAL_DLLPUBLIC void SAL_CALL rtl_secureZeroMemory ( + void * Ptr, + sal_Size Bytes +) SAL_THROW_EXTERN_C(); + /** Zero and free memory. @param Ptr [in] pointer to previously allocated memory. @param Bytes [in] memory size. - @return none. Memory is zero'ed and released. Ptr is invalid. + @return none. Memory is zero'ed with rtl_secureZeroMemory and released. Ptr + is invalid. */ SAL_DLLPUBLIC void SAL_CALL rtl_freeZeroMemory ( void * Ptr, sal_Size Bytes ) SAL_THROW_EXTERN_C(); - /** Allocate aligned memory. A call to this function will return NULL upon the requested |