[3.0] Fixed crash issue by buffer overflow