diff options
author | Yeongjong Lee <yj34.lee@samsung.com> | 2019-01-28 17:26:09 +0900 |
---|---|---|
committer | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2019-01-28 17:26:09 +0900 |
commit | 37313986226c5ec05375ff6ae394585085efe211 (patch) | |
tree | d862b8bc945eafd5c0c88f6d5f8da6b4256944a0 /src/bin | |
parent | 99930c1a59ba015971eee21c80d3c50b6008c77b (diff) | |
download | efl-37313986226c5ec05375ff6ae394585085efe211.tar.gz |
edje_cc: check return value of fseeks
Reviewers: Jaehyun_Cho, zmike
Reviewed By: Jaehyun_Cho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7796
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/edje/edje_cc_out.c | 3 | ||||
-rw-r--r-- | src/bin/edje/edje_cc_sources.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index c791e8d1c6..90c7d8f46c 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -2190,7 +2190,8 @@ data_thread_script(void *data, Ecore_Thread *thread EINA_UNUSED) return; } - fseek(f, 0, SEEK_END); + if (fseek(f, 0, SEEK_END) < 0) + ERR("Error seeking"); size = ftell(f); rewind(f); diff --git a/src/bin/edje/edje_cc_sources.c b/src/bin/edje/edje_cc_sources.c index a8bd949576..25ed765c02 100644 --- a/src/bin/edje/edje_cc_sources.c +++ b/src/bin/edje/edje_cc_sources.c @@ -63,9 +63,11 @@ source_fetch_file(const char *fil, const char *filname) exit(-1); } - fseek(f, 0, SEEK_END); + if (fseek(f, 0, SEEK_END) < 0) + ERR("Error seeking"); sz = ftell(f); - fseek(f, 0, SEEK_SET); + if (fseek(f, 0, SEEK_SET) < 0) + ERR("Error seeking"); sf = mem_alloc(SZ(SrcFile)); sf->name = mem_strdup(filname); sf->file = mem_alloc(sz + 1); @@ -80,7 +82,8 @@ source_fetch_file(const char *fil, const char *filname) } sf->file[sz] = '\0'; - fseek(f, 0, SEEK_SET); + if (fseek(f, 0, SEEK_SET) < 0) + ERR("Error seeking"); srcfiles.list = eina_list_append(srcfiles.list, sf); while (fgets(buf, sizeof(buf), f)) |