]> git.ipfire.org Git - thirdparty/qemu.git/commit
vvfat: Fix segfault on write to read-only disk
authorKevin Wolf <mail@kevin-wolf.de>
Fri, 10 Sep 2010 10:27:02 +0000 (12:27 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 13 Sep 2010 12:34:56 +0000 (14:34 +0200)
commit1b191088aed81f1b3661b1554f98a038872a9423
treef541031a6b025c40817ae3e1d1178467cf856690
parent2c25b8131631c39145fe1f5b7745943e0e0c0406
vvfat: Fix segfault on write to read-only disk

vvfat tries to set the readonly flag in its open function, but nowadays
this is overwritted with the readonly=... command line option. Check in
bdrv_write if the vvfat was opened read-only and return an error in this
case.

Without this check, vvfat tries to access the qcow bs, which is NULL
without enabled write support.

Signed-off-by: Kevin Wolf <mail@kevin-wolf.de>
(cherry picked from commit bfd0049440f53745d31eb93c208f0f3ab6308027)
block/vvfat.c