Skip to content
Snippets Groups Projects
Commit 594b80f4 authored by Basile Desloges's avatar Basile Desloges Committed by Andre Maroneze
Browse files

[libc] Add secure_getenv

parent 427ca8a0
No related branches found
No related tags found
No related merge requests found
......@@ -416,7 +416,7 @@ extern long int jrand48 (unsigned short xsubi[3]);
complete behaviors;
disjoint behaviors; */
extern void *calloc(size_t nmemb, size_t size);
/*@ allocates \result;
@ assigns __fc_heap_status \from size, __fc_heap_status;
@ assigns \result \from indirect:size, indirect:__fc_heap_status;
......@@ -562,6 +562,16 @@ extern char *__fc_env[ARG_MAX];
*/
extern char *getenv(const char *name);
// Non-POSIX, GNU extension
/*@
requires valid_name: valid_read_string(name);
assigns \result \from __fc_env[0..], indirect:name,
indirect:name[0 .. strlen(name)];
ensures null_or_valid_result:
\result == \null || (\valid(\result) && valid_read_string(\result));
*/
extern char *secure_getenv(const char *name);
/*@
requires valid_string: valid_read_string(string);
assigns __fc_env[0..] \from __fc_env[0..], string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment