Fix ASAN issue about wrong parameter size