aboutsummaryrefslogtreecommitdiff
path: root/block-vpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'block-vpc.c')
-rw-r--r--block-vpc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block-vpc.c b/block-vpc.c
index 88ad575bf8..e4c51bab2a 100644
--- a/block-vpc.c
+++ b/block-vpc.c
@@ -81,9 +81,8 @@ typedef struct BDRVVPCState {
static int vpc_probe(const uint8_t *buf, int buf_size, const char *filename)
{
- if (!strncmp(buf, "conectix", 8))
+ if (buf_size >= 8 && !strncmp(buf, "conectix", 8))
return 100;
-
return 0;
}