Fix coverity issue 54/222854/2
authorjiyong.min <jiyong.min@samsung.com>
Tue, 21 Jan 2020 01:20:20 +0000 (10:20 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Tue, 21 Jan 2020 01:39:28 +0000 (10:39 +0900)
commit5bf3bfe75d8feb1029f9b2886f07b7aa57eb6dd9
treed9e80912f070123c98f0831804ddd8f75d24ac84
parentbe9b346c4f7aa631cee99306fff1a53c88ddb8d9
Fix coverity issue

  - Argument cannot be negative

  'ftell' returns signed long and it can be negative(-1).
  Unsigned int 'file_size(size)' can get tainted value.
  So signed long for ftell has been added and check if it is below zero.

Change-Id: Ibe651c19465acc57b2e4e31b705644887c18a623
tests/mm_file_test.c