diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2020-04-17 14:12:48 +0200 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2020-04-20 12:20:52 +0200 |
commit | 25f4cba10dd136bd7fdd4a92263dfdbc5d898604 (patch) | |
tree | a8e017c8aa4e0ad460892ac87d28677a49829730 /src/bin | |
parent | c80b0b1360ad0b9258c36a9e09a419e6acafd30c (diff) | |
download | efl-25f4cba10dd136bd7fdd4a92263dfdbc5d898604.tar.gz |
exactness: make sure we handle a negative file descriptor
In an error case the fd could be negative here and we should check
before feeding it into fdopen().
CID: 1422197
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11725
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/exactness/recorder.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/exactness/recorder.c b/src/bin/exactness/recorder.c index 35c747a699..59a5549131 100644 --- a/src/bin/exactness/recorder.c +++ b/src/bin/exactness/recorder.c @@ -265,6 +265,7 @@ _setup_fonts_dir(const char *fonts_dir) if (_unit->fonts_path) { int tmp_fd = eina_file_mkstemp("/tmp/fonts_XXXXXX.conf", &fonts_conf_name); + if (tmp_fd < 0) return EINA_FALSE; FILE *tmp_f = fdopen(tmp_fd, "wb"); fprintf(tmp_f, "<?xml version=\"1.0\"?>\n<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\n<fontconfig>\n" |