Skip to content

Commit 5632705

Browse files
committed
Auto merge of #2381 - devnexen:obsd_alloc_fn_sec, r=semarie,JohnTitor
openbsd add secure alloc fn.
2 parents 7964597 + 5de2655 commit 5632705

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libc-test/semver/openbsd.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,7 @@ arphdr
908908
atof
909909
bsearch
910910
caddr_t
911+
calloc_conceal
911912
chflags
912913
chflagsat
913914
chroot
@@ -937,6 +938,7 @@ fmemopen
937938
forkpty
938939
freeifaddrs
939940
freelocale
941+
freezero
940942
fsid_t
941943
fstatfs
942944
fusefs_args
@@ -989,6 +991,7 @@ lastlog
989991
lockf
990992
login_tty
991993
madvise
994+
malloc_conceal
992995
memmem
993996
memrchr
994997
mfs_args

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,10 @@ extern "C" {
15871587
pub fn explicit_bzero(s: *mut ::c_void, len: ::size_t);
15881588

15891589
pub fn setproctitle(fmt: *const ::c_char, ...);
1590+
1591+
pub fn freezero(ptr: *mut ::c_void, size: ::size_t);
1592+
pub fn malloc_conceal(size: ::size_t) -> *mut ::c_void;
1593+
pub fn calloc_conceal(nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
15901594
}
15911595

15921596
cfg_if! {

0 commit comments

Comments
 (0)