Daniel P. Berrange b72981b910 ipmi: check return of qemu_chr_fe_write() for errors
The continue_send() method in ipmi_bmc_extern.c directly
assigns the return value of qemu_chr_fe_write() to the
variable tracking the I/O buffer offset. This ignores the
possibility that the return value could be -1 and so will
cause I/O go backwards on EAGAIN. Fortunately 'outpos' is
unsigned, so can't go negative - it will become MAX_INT
which will cause the loop to stop, and avoid an accidental
out of bounds array access.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <1473170165-540-2-git-send-email-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-09-13 19:09:42 +02:00
..
2016-09-08 18:05:21 +04:00
2016-09-08 18:05:21 +04:00
2016-09-08 18:05:21 +04:00
2016-09-08 18:05:22 +04:00
2016-06-17 16:33:48 +10:00
2016-09-08 18:05:21 +04:00
2016-06-14 15:59:13 +01:00
2016-09-09 20:58:34 +03:00
2016-09-08 18:05:21 +04:00
2016-09-08 18:05:21 +04:00
2016-05-18 15:04:27 +03:00
2016-09-08 18:05:21 +04:00
2016-09-08 11:28:12 +01:00
2016-07-29 00:07:09 +03:00
2016-01-29 15:07:25 +00:00
2016-09-08 18:05:22 +04:00
2016-06-24 05:13:57 +03:00
2015-12-22 18:39:19 +02:00