jni: more O_CLOEXECs
Prevent FDs from leaking across an execve() boundary. Test: compiles and boots Change-Id: I5f91046917b55b6abead0a5c6e939f82814e6f18
This commit is contained in:
@@ -95,7 +95,7 @@ static jlongArray get_long_array(JNIEnv* env, jobject obj, jfieldID field, int s
|
|||||||
static int legacyReadNetworkStatsDetail(std::vector<stats_line>* lines,
|
static int legacyReadNetworkStatsDetail(std::vector<stats_line>* lines,
|
||||||
const std::vector<std::string>& limitIfaces,
|
const std::vector<std::string>& limitIfaces,
|
||||||
int limitTag, int limitUid, const char* path) {
|
int limitTag, int limitUid, const char* path) {
|
||||||
FILE* fp = fopen(path, "r");
|
FILE* fp = fopen(path, "re");
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user