Skip to content

Sanitizer issue when accessing headRotData in IVAS rend

Memory sanitizer error is raised in combine_external_and_head_orientations_rend() when accessing hHeadTrackData (which is a pointer to hIvasRend->headRotData) values. This is caused because headRotData is not a pointer but a structure within hIvasRend. The check for NULL pointer in line 901 in ivas_rotation.c is then always passing (even though headRotData would not have been initialized) and passing the read hHeadTrackData.sr_pose_pred_axis to the return function raises a sanitizer error.

One way to fix this is to change the hHeadTrackData parameter in combine_external_and_head_orientations_rend() to not be a pointer and then change the NULL check in line 901 to check for hHeadTrackData.hOrientationTracker which is real pointer.