intel/tools: handle ftell errors
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Wed, 9 Sep 2020 16:48:16 +0000 (18:48 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Sep 2020 12:16:58 +0000 (12:16 +0000)
commit5b6fd2a3140fa70a86a65631a20bf39d75e89c0d
tree5bff2be730c1b01519e243c3c42958da23874de7
parent46a82aa3a6044998d17dded35249a562203f6138
intel/tools: handle ftell errors

Found by Coverity, as "argument cannot be negative", referring to
fread's 2nd argument.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
src/intel/tools/i965_disasm.c