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, 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)