From: Steinar H. Gunderson Date: Fri, 21 Dec 2018 18:14:01 +0000 (+0100) Subject: Fix another Coverity Scan issue that really should not happen in practice. X-Git-Tag: 1.8.1~56 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=3ceb5cb223ba03df13fb226c5cb07e3d2b71b3c6 Fix another Coverity Scan issue that really should not happen in practice. --- diff --git a/shared/read_file.cpp b/shared/read_file.cpp index 2310303..4084654 100644 --- a/shared/read_file.cpp +++ b/shared/read_file.cpp @@ -27,6 +27,10 @@ string read_file(const string &filename, const unsigned char *start, const size_ } int disk_size = ftell(fp); + if (disk_size == -1) { + perror("ftell"); + exit(1); + } ret = fseek(fp, 0, SEEK_SET); if (ret == -1) {