Re: [Qemu-devel] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-30 Thread zhanghailiang
On 2014/10/30 15:10, Markus Armbruster wrote: writes: From: Gonglei After commit 4c7e251a (), when dump memory completed, the s->fd will be closed twice. We should return directly when dump completed. Using do/while block, make the badly chosen return values of get_next_block() more visible

Re: [Qemu-devel] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-30 Thread Markus Armbruster
writes: > From: Gonglei > > After commit 4c7e251a (), when dump memory completed, > the s->fd will be closed twice. We should return > directly when dump completed. > > Using do/while block, make the badly chosen return > values of get_next_block() more visible and fix > this issue. > > Signed-o

[Qemu-devel] [PATCH v2] dump: fix use-after-free for s->fd

2014-10-29 Thread arei.gonglei
From: Gonglei After commit 4c7e251a (), when dump memory completed, the s->fd will be closed twice. We should return directly when dump completed. Using do/while block, make the badly chosen return values of get_next_block() more visible and fix this issue. Signed-off-by: Gonglei --- v2 -> v1: