A lock/unlock/islocked ioctl() should be prevented from anything past
the last byte, inclusive. But we were doing an exclusive check.
This isn't a big deal, as the kernel MTD APIs would be guarding this
anyway, but let's do this for completeness.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
} else {
mtdLockInfo.start = 0;
}
- if (mtdLockInfo.start > mtdInfo.size)
+ if (mtdLockInfo.start >= mtdInfo.size)
errmsg_die("%#x is beyond device size %#x",
mtdLockInfo.start, mtdInfo.size);