diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2020-04-17 15:23:44 +0200 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2020-04-20 12:20:54 +0200 |
commit | 6b1ed0f5737fa5a531ed016f8f0cacc9fafcca1b (patch) | |
tree | 6a0d55c03559c9ee2db0a4e9a24dc021dc6ba3dd /src | |
parent | 25f4cba10dd136bd7fdd4a92263dfdbc5d898604 (diff) | |
download | efl-6b1ed0f5737fa5a531ed016f8f0cacc9fafcca1b.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(). This is the same patch we used in
recorder.c
CID: 1422194
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11728
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/exactness/player.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c index 870cc51d27..2dcf3f5e59 100644 --- a/src/bin/exactness/player.c +++ b/src/bin/exactness/player.c @@ -983,6 +983,7 @@ _setup_font_settings(const char *fonts_dir) if (chosen_fonts) { 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" |