This repository has been archived by the owner on Jul 19, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use secure_getenv always if it's available. If it's not available, fall back to getenv (because some libc's, like musl, don't export secure_getenv). Change-Id: I0cae57e1048dcbbadbdd9cc71cc17d51706161a0
- Loading branch information
1 parent
d1a9776
commit f7a2742
Showing
1 changed file
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Maybe should have pointed this out in the original report... but this checks for the compiler and not libc. doesn't it? I haven't tried this yet but I don't think this works.
https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv has an example of handling this without checking for specific libcs and versions, which I believe would be the best way.
I'll run some build tests today.