CSharp_Dali_Actor_GetSuggestedMinimumWidth/Height calls
GetNaturalSize().
This causes ASAN heap-buffer-overflow issue when
SwigDirector_ViewWrapperImpl::GetNaturalSize() is called.
In SwigDirector_ViewWrapperImpl::GetNaturalSize(), type casting from
Dali::Vector2 to Dali::Vector3 is done so it causes ASAN
heap-buffer-overflow issue.
Not to cause ASAN heap-buffer-overflow issue, casting Dali::Vector2 and
assigning it to Dali::Vector3 is required.
Change-Id: I1a85da7440c517f5cd27c32b535359d670b57655
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Unexpected null return for type Dali::Vector3", 0);
return c_result;
}
- c_result = *(Dali::Vector3 *)jresult;
+
+ // Tizen.NUI.ViewWrapperImpl.DirectorGetNaturalSize() is assigned to swig_callbackGetNaturalSize().
+ // Tizen.NUI.ViewWrapperImpl.DirectorGetNaturalSize() returns Dali::Vector2.
+ // Moreover, Dali::Vector3 supports operator '=' with Dali::Vector2.
+ // Not to cause ASAN heap-buffer-overflow issue here, casting Dali::Vector2 and assigning it to Dali::Vector3 is required.
+ c_result = *(Dali::Vector2 *)jresult;
}
return c_result;
}