forked from enlightenment/efl
ftell can return -1 to indicate error, so trap for that.
Fixes Coverity CID1039356 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
164269a2da
commit
41a700b2d5
|
@ -269,6 +269,13 @@ do_eet_insert(const char *file,
|
|||
|
||||
fseek(f, 0, SEEK_END);
|
||||
size = ftell(f);
|
||||
if (size < 0)
|
||||
{
|
||||
ERR("cannot obtain current file position %s", out);
|
||||
fclose(f);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
rewind(f);
|
||||
data = malloc(size);
|
||||
if (!data)
|
||||
|
|
Loading…
Reference in New Issue