[PATCH openEuler-21.03] tracing: Correct the length check which causes memory corruption