diff options
author | Dongsun Lee <ds73.lee@samsung.com> | 2018-10-01 13:15:00 +0900 |
---|---|---|
committer | Dongsun Lee <ds73.lee@samsung.com> | 2018-10-01 13:33:39 +0900 |
commit | a4141a09f28a092f8bcd30fded8a602cba009be0 (patch) | |
tree | adf8821886ccc48e49ff9cc62212c678ffe56d49 | |
parent | 3a04ac94f958f888bc0c2cb409e2e2951a118815 (diff) | |
download | libwebappenc-a4141a09f28a092f8bcd30fded8a602cba009be0.tar.gz libwebappenc-a4141a09f28a092f8bcd30fded8a602cba009be0.tar.bz2 libwebappenc-a4141a09f28a092f8bcd30fded8a602cba009be0.zip |
Fix SVACE
- WGID=246303 : UNCHECKED_FUNC_RES.LIB.STRICT
Change-Id: Ieaf575a65ec650949853ffd634500f480a64b588
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
-rw-r--r-- | srcs/key_handler.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/srcs/key_handler.c b/srcs/key_handler.c index c5a2f95..b992799 100644 --- a/srcs/key_handler.c +++ b/srcs/key_handler.c @@ -157,7 +157,11 @@ static int _read_from_file(const char *path, raw_buffer_s **pdata) return WAE_ERROR_FILE; } - fseek(f, 0, SEEK_END); // move to the end of a file + if (fseek(f, 0, SEEK_END) != 0) { // move to the end of a file + WAE_SLOGE("Failed in fseek. file=%s", path); + ret = WAE_ERROR_FILE; + goto error; + } int file_len = ftell(f); if (file_len <= 0) { @@ -166,7 +170,11 @@ static int _read_from_file(const char *path, raw_buffer_s **pdata) goto error; } - fseek(f, 0, SEEK_SET); // move to the start of a file + if (fseek(f, 0, SEEK_SET) != 0) { // move to the start of a file + WAE_SLOGE("Failed in fseek. file=%s", path); + ret = WAE_ERROR_FILE; + goto error; + } data = buffer_create(file_len); if (data == NULL) { |