Move from memset to memset_s.
This adds the extra bounds checks and panics if there is a violation.
Change-Id: I9db3ca44be4f9c39964d912b57fe7b68e2792bc1
diff --git a/inc/hf/std.h b/inc/hf/std.h
index bb71a9d..73c7d1c 100644
--- a/inc/hf/std.h
+++ b/inc/hf/std.h
@@ -17,3 +17,16 @@
#pragma once
#include "hf/arch/std.h"
+
+typedef size_t rsize_t;
+
+#define RSIZE_MAX SIZE_MAX
+
+/*
+ * Only the safer versions of these functions are exposed to reduce the chance
+ * of misusing the versions without bounds checking or null pointer checks.
+ *
+ * These functions don't return errno_t as per the specification and implicity
+ * have a constraint handler that panics.
+ */
+void memset_s(void *dest, rsize_t destsz, int ch, rsize_t count);