diff --git a/tools/pvck.c b/tools/pvck.c index 0d1bc1b17..b96b1c784 100644 --- a/tools/pvck.c +++ b/tools/pvck.c @@ -379,6 +379,9 @@ static bool _read_bytes(struct device *dev, struct devicefile *def, uint64_t sta if (dev) return dev_read_bytes(dev, start, len, data); + if (!def) + return false; + off = lseek(def->fd, start, SEEK_SET); if (off != start) return false;