Unverified Commit 785dd4d2 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12723 ppp: fix ppp_async_encode() illegal access

parents 13fa8905 dd59afc2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -552,7 +552,7 @@ ppp_async_encode(struct asyncppp *ap)
	 * and 7 (code-reject) must be sent as though no options
	 * had been negotiated.
	 */
	islcp = proto == PPP_LCP && 1 <= data[2] && data[2] <= 7;
	islcp = proto == PPP_LCP && count >= 3 && 1 <= data[2] && data[2] <= 7;

	if (i == 0) {
		if (islcp)