Re: [Qemu-devel] [PATCH] scsi-disk: fix buffer overflow

2010-03-17 Thread Anthony Liguori
On 03/10/2010 10:47 AM, Gerd Hoffmann wrote: In case s->version is shorter than 4 bytes we overflow the memcpy src buffer. Fix it by clearing the target buffer, then copy only the amount of bytes we actually have. Signed-off-by: Gerd Hoffmann Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] scsi-disk: fix buffer overflow

2010-03-13 Thread Aurelien Jarno
On Wed, Mar 10, 2010 at 05:47:17PM +0100, Gerd Hoffmann wrote: > In case s->version is shorter than 4 bytes we overflow the memcpy src > buffer. Fix it by clearing the target buffer, then copy only the > amount of bytes we actually have. > > Signed-off-by: Gerd Hoffmann > --- > hw/scsi-disk.c |