Unverified Commit 0a80f4d9 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15364 LoongArch: csum: Fix OoB access in IP checksum code for negative lengths

parents dadc9a82 ee47a5cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ unsigned int __no_sanitize_address do_csum(const unsigned char *buff, int len)
	const u64 *ptr;
	u64 data, sum64 = 0;

	if (unlikely(len == 0))
	if (unlikely(len <= 0))
		return 0;

	offset = (unsigned long)buff & 7;