mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-03 12:28:07 +00:00
st/oxr: Tidy off by one error
This commit is contained in:
parent
98c91ccb25
commit
a6ea2816cb
|
@ -128,7 +128,7 @@ oxr_verify_full_path(struct oxr_logger* log,
|
||||||
State state = State::Start;
|
State state = State::Start;
|
||||||
bool valid = true;
|
bool valid = true;
|
||||||
|
|
||||||
if (length >= UINT32_MAX || length + 1 >= XR_MAX_PATH_LENGTH) {
|
if (length >= UINT32_MAX || (length + 1) > XR_MAX_PATH_LENGTH) {
|
||||||
return oxr_error(
|
return oxr_error(
|
||||||
log, XR_ERROR_PATH_FORMAT_INVALID,
|
log, XR_ERROR_PATH_FORMAT_INVALID,
|
||||||
"(%s) string is too long for a path (%u + 1) > %u", name,
|
"(%s) string is too long for a path (%u + 1) > %u", name,
|
||||||
|
|
Loading…
Reference in a new issue