qcacmn: Add a check to avoid processing invalid pktlog buffers

Avoid further processing of pktlog buffers received from
firmware or Hardware if the size is greater than
MAX_PKTLOG_RECV_BUF_SIZE.

Change-Id: If1dd855137a9b83721f01005fa3367f7924f4ebb
CRs-Fixed: 2493721
This commit is contained in:
Venkata Sharath Chandra Manchala
2019-08-07 15:59:27 -07:00
committed by nshrivas
parent 851c69d5bb
commit c0980fd21e
3 changed files with 11 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -102,6 +102,7 @@ struct pktlog_dev_t {
void *htc_pdev;
bool vendor_cmd_send;
uint8_t callback_type;
uint32_t invalid_packets;
};
#define PKTLOG_SYSCTL_SIZE 14