Message ID | 20171031112655.10516.5241.stgit@pasha-VirtualBox (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/replay/replay-internal.c b/replay/replay-internal.c index d036a02..0f73fdc 100644 --- a/replay/replay-internal.c +++ b/replay/replay-internal.c @@ -62,7 +62,9 @@ void replay_put_array(const uint8_t *buf, size_t size) { if (replay_file) { replay_put_dword(size); - fwrite(buf, 1, size, replay_file); + if (fwrite(buf, 1, size, replay_file) != size) { + error_report("replay write error"); + } } }
This patch adds error reporting when fwrite cannot completely save the buffer to the file. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> --- replay/replay-internal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)