forked from enlightenment/efl
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
This commit is contained in:
parent
95bff0fac9
commit
61599d67ed
|
@ -956,7 +956,7 @@ _setup_font_settings(const char *fonts_dir)
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
if (!fonts_dir) fonts_dir = "./fonts";
|
if (!fonts_dir) fonts_dir = "./fonts";
|
||||||
sprintf(buf, "%s/%s", fonts_dir, _src_unit->fonts_path);
|
snprintf(buf, PATH_MAX, "%s/%s", fonts_dir, _src_unit->fonts_path);
|
||||||
if (!ecore_file_exists(buf))
|
if (!ecore_file_exists(buf))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Unable to use the fonts path '%s' provided in %s\n",
|
fprintf(stderr, "Unable to use the fonts path '%s' provided in %s\n",
|
||||||
|
|
Loading…
Reference in New Issue