diff options
author | Joe Watkins <krakjoe@php.net> | 2017-01-10 11:51:39 +0000 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-01-10 11:51:39 +0000 |
commit | 4cddc85c1ffa696decbcd2bd6c783893fc2bf82e (patch) | |
tree | c6e8b64e0a0aef2585c8a63098bbe7c3730bd011 /acinclude.m4 | |
parent | aadc84f6f749f05bc5d6cbf4f44a21734a9c6d3f (diff) | |
parent | 1bdffee820d92f558d883bd1aa41bebc739e2980 (diff) | |
download | php-git-4cddc85c1ffa696decbcd2bd6c783893fc2bf82e.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Prevent fd leak in readdir_r that causes false negative on readdir_r implementation when compiled with AddressSanitizer
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 1a4ac7ce83..51b397f8eb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1376,8 +1376,11 @@ main() { dir = opendir("/"); if (!dir) exit(1); - if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) + if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) { + close(dir); exit(0); + } + close(dir); exit(1); } ],[ |