mirror of
https://github.com/lbgos/rift-s-linux.git
synced 2026-10-29 04:02:05 +01:00
st/oxr: Correctly validate time in xrLocateSpace
This commit is contained in:
1 parent
dd04379209
commit
03f802de77
2 files changed
+12
-4
No files matched your search
@@ -0,0 +1 @@
|
||||
OpenXR: Correctly reject invalid times given to `xrLocateSpace`.
|
||||
@@ -7,10 +7,6 @@
|
||||
* @ingroup oxr_api
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "xrt/xrt_compiler.h"
|
||||
|
||||
#include "math/m_api.h"
|
||||
@@ -23,6 +19,11 @@
|
||||
#include "oxr_api_funcs.h"
|
||||
#include "oxr_api_verify.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
|
||||
XrResult
|
||||
oxr_xrCreateActionSpace(XrSession session,
|
||||
@@ -127,6 +128,12 @@ oxr_xrLocateSpace(XrSpace space,
|
||||
OXR_VERIFY_ARG_TYPE_AND_NOT_NULL(&log, location,
|
||||
XR_TYPE_SPACE_LOCATION);
|
||||
|
||||
if (time <= (XrTime)0) {
|
||||
return oxr_error(&log, XR_ERROR_TIME_INVALID,
|
||||
"(time == %" PRIi64 ") is not a valid time.",
|
||||
time);
|
||||
}
|
||||
|
||||
return oxr_space_locate(&log, spc, baseSpc, time, location);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user