Unverified Commit 9757cd71 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!7889 vt: fix unicode buffer corruption when deleting characters

parents 7f5fed5d 52553ef9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ static void vc_uniscr_delete(struct vc_data *vc, unsigned int nr)
		char32_t *ln = uniscr->lines[vc->state.y];
		unsigned int x = vc->state.x, cols = vc->vc_cols;

		memcpy(&ln[x], &ln[x + nr], (cols - x - nr) * sizeof(*ln));
		memmove(&ln[x], &ln[x + nr], (cols - x - nr) * sizeof(*ln));
		memset32(&ln[cols - nr], ' ', nr);
	}
}