summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--htc/htc_send.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/htc/htc_send.c b/htc/htc_send.c
index c2c60003a8f9..551ff0e277d9 100644
--- a/htc/htc_send.c
+++ b/htc/htc_send.c
@@ -1410,7 +1410,14 @@ static inline QDF_STATUS __htc_send_pkt(HTC_HANDLE HTCHandle,
return QDF_STATUS_E_INVAL;
}
- AR_DEBUG_ASSERT(pPacket->Endpoint < ENDPOINT_MAX);
+ if ((pPacket->Endpoint >= ENDPOINT_MAX) ||
+ (pPacket->Endpoint <= ENDPOINT_UNUSED)) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("%s endpoint is invalid\n",
+ __func__));
+ AR_DEBUG_ASSERT(0);
+ return QDF_STATUS_E_INVAL;
+ }
+
pEndpoint = &target->endpoint[pPacket->Endpoint];
if (!pEndpoint->service_id) {