replay: Exit on errors reading from replay log
commit0b57007755c2ee442740b5321ffc7072aed88714
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 6 Nov 2018 15:33:30 +0000 (6 15:33 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 8 Nov 2018 13:24:35 +0000 (8 13:24 +0000)
tree56186f8fe222e8007119c7d0eb0b1398348570e1
parentfa27257432689e8927cb993b251d380d654dcc86
replay: Exit on errors reading from replay log

Currently replay_get_byte() does not check for an error
from getc(). Coverity points out (CID 1390622) that this
could result in unexpected behaviour (such as looping
forever, if we use the replay_get_dword() return value
for a loop count). We don't expect reads from the replay
log to fail, and if they do there is no way we can
continue. So make them fatal errors.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-id: 20181106153330.5139-1-peter.maydell@linaro.org
replay/replay-internal.c