Unverified Commit 8ad8f5dc authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12721 ppp: fix ppp_async_encode() illegal access

parents c6de47cf a350afe9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -555,7 +555,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)