summaryrefslogtreecommitdiff
path: root/libgcompat
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2020-10-29 02:10:07 -0500
committerA. Wilcox <awilcox@wilcox-tech.com>2022-06-26 21:06:02 +0000
commitc6921a1aa454bb87671f9bd1ecfe47d80d1620aa (patch)
tree3c82eef28f0887d979c9e4ab02eb057130f1a0f3 /libgcompat
parentb15e0349412b79f77b723372c0012caf9daa8f1a (diff)
downloadgcompat-c6921a1aa454bb87671f9bd1ecfe47d80d1620aa.tar.gz
gcompat-c6921a1aa454bb87671f9bd1ecfe47d80d1620aa.tar.bz2
gcompat-c6921a1aa454bb87671f9bd1ecfe47d80d1620aa.tar.xz
gcompat-c6921a1aa454bb87671f9bd1ecfe47d80d1620aa.zip
string: add __explicit_bzero_chk
Diffstat (limited to 'libgcompat')
-rw-r--r--libgcompat/string.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libgcompat/string.c b/libgcompat/string.c
index f2a2e87..a164ab2 100644
--- a/libgcompat/string.c
+++ b/libgcompat/string.c
@@ -87,6 +87,14 @@ void *__memset_chk(void *s, int c, size_t n, size_t buflen)
return memset(s, c, n);
}
+void __explicit_bzero_chk(void *s, size_t n, size_t buflen)
+{
+ assert(s != NULL);
+ assert(buflen >= n);
+
+ explicit_bzero(s, n);
+}
+
/**
* Find byte in memory.
*