summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-11-18 11:58:39 +0000
committerChris Michael <cp.michael@samsung.com>2013-11-18 11:58:39 +0000
commit41a700b2d51d65e8a6b5b6490aac08e059a9038c (patch)
tree5965027a2f97f0240ca1614b3ba148e04339ffa9 /src
parent164269a2dae3b15c37a319e43b5fc38d9bcd2038 (diff)
ftell can return -1 to indicate error, so trap for that.
Fixes Coverity CID1039356 Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/bin/eet/eet_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/eet/eet_main.c b/src/bin/eet/eet_main.c
index e59c2599e9..c2f0338756 100644
--- a/src/bin/eet/eet_main.c
+++ b/src/bin/eet/eet_main.c
@@ -269,6 +269,13 @@ do_eet_insert(const char *file,
269 269
270 fseek(f, 0, SEEK_END); 270 fseek(f, 0, SEEK_END);
271 size = ftell(f); 271 size = ftell(f);
272 if (size < 0)
273 {
274 ERR("cannot obtain current file position %s", out);
275 fclose(f);
276 exit(-1);
277 }
278
272 rewind(f); 279 rewind(f);
273 data = malloc(size); 280 data = malloc(size);
274 if (!data) 281 if (!data)