Skip to content
Snippets Groups Projects
Commit 7da9623c authored by Thomas Huth's avatar Thomas Huth Committed by Hanna Reitz
Browse files

block/vpc: Add a sanity check that fixed-size images have the right type


The code in vpc.c uses BDRVVPCState->footer.type in various places
to decide whether the image is a fixed-size (VHD_FIXED) or a dynamic
(VHD_DYNAMIC) image. However, we never check that this field really
contains VHD_FIXED if we detected a fixed size image in vpc_open(),
so a wrong value here could cause quite some trouble during runtime.

Suggested-by: default avatarKevin Wolf <kwolf@redhat.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Message-Id: <20211012082702.792259-1-thuth@redhat.com>
Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
parent f3d43dfd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment