Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9aa93749 authored by CNSS_WLAN Service's avatar CNSS_WLAN Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wlan: Add sanity check for data in ptt_sock_rx_nlink_msg" into wlan-driver.lnx.1.0

parents de700339 70f73667
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -297,6 +297,11 @@ static int ptt_sock_rx_nlink_msg (struct sk_buff * skb)
   wnl = (tAniNlHdr *) skb->data;
   radio = wnl->radio;
   type = wnl->nlh.nlmsg_type;

   if (wnl->nlh.nlmsg_len < (sizeof(struct nlmsghdr) +
       sizeof(int) + sizeof(tAniHdr) + wnl->wmsg.length))
	   return -EINVAL;

   switch (type) {
      case ANI_NL_MSG_PUMAC:  //Message from the PTT socket APP
         PTT_TRACE(VOS_TRACE_LEVEL_INFO, "%s: Received ANI_NL_MSG_PUMAC Msg [0x%X]\n",