summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-04-16 16:25:29 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2020-04-17 10:43:04 +0200
commit61599d67ed66fbf93de4eca7f81ef7669028fb45 (patch)
tree23231b2bd12331e6b8fe2b13210f3d889b846893
parent95bff0fac902e31b2c20ce1949421d6650c0bbf7 (diff)
exactness: limit length for font_path to stay in buffer
We get fonts_dir from a getenv() without and length check. Make sure that we stay in the given buffer size when stitching the file path together. CID: 1422195 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11718
-rw-r--r--src/bin/exactness/player.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c
index c51e1cf4e4..870cc51d27 100644
--- a/src/bin/exactness/player.c
+++ b/src/bin/exactness/player.c
@@ -956,7 +956,7 @@ _setup_font_settings(const char *fonts_dir)
956 { 956 {
957 char buf[PATH_MAX]; 957 char buf[PATH_MAX];
958 if (!fonts_dir) fonts_dir = "./fonts"; 958 if (!fonts_dir) fonts_dir = "./fonts";
959 sprintf(buf, "%s/%s", fonts_dir, _src_unit->fonts_path); 959 snprintf(buf, PATH_MAX, "%s/%s", fonts_dir, _src_unit->fonts_path);
960 if (!ecore_file_exists(buf)) 960 if (!ecore_file_exists(buf))
961 { 961 {
962 fprintf(stderr, "Unable to use the fonts path '%s' provided in %s\n", 962 fprintf(stderr, "Unable to use the fonts path '%s' provided in %s\n",