summaryrefslogtreecommitdiff
path: root/src/stdlib/getenv_s.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/getenv_s.c')
-rw-r--r--src/stdlib/getenv_s.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stdlib/getenv_s.c b/src/stdlib/getenv_s.c
index 73e6131c..489bdeea 100644
--- a/src/stdlib/getenv_s.c
+++ b/src/stdlib/getenv_s.c
@@ -1,11 +1,16 @@
#include <string.h>
#include <stdlib.h>
+#include <string.h>
#include "_stdlib.h"
/** get an environment variable **/
errno_t getenv_s(size_t * restrict len, char * restrict value, rsize_t maxsize, const char * restrict name)
{
SIGNAL_SAFE(0);
+ ASSERT_NOOVERLAP(len, sizeof(*len), value, maxsize);
+ ASSERT_NOOVERLAP(len, sizeof(*len), name, strlen(name));
+ ASSERT_NOOVERLAP(value, maxsize, name, strlen(name));
+
(void)len; (void)value; (void)maxsize; (void)name;
return 0;
}