summaryrefslogtreecommitdiff
path: root/pn8x/libese-spi/p73/lib/phNxpEseDataMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pn8x/libese-spi/p73/lib/phNxpEseDataMgr.cpp')
-rwxr-xr-xpn8x/libese-spi/p73/lib/phNxpEseDataMgr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/pn8x/libese-spi/p73/lib/phNxpEseDataMgr.cpp b/pn8x/libese-spi/p73/lib/phNxpEseDataMgr.cpp
index 0213e18..ef0ca3a 100755
--- a/pn8x/libese-spi/p73/lib/phNxpEseDataMgr.cpp
+++ b/pn8x/libese-spi/p73/lib/phNxpEseDataMgr.cpp
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Copyright 2018 NXP
+ * Copyright 2018,2023 NXP
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -79,6 +79,10 @@ ESESTATUS phNxpEse_GetData(uint32_t* data_len, uint8_t** pbuffer) {
*
******************************************************************************/
ESESTATUS phNxpEse_StoreDatainList(uint32_t data_len, uint8_t* pbuff) {
+ if (data_len > MAX_DATA_LEN) {
+ ALOGE("%s Data length causes oob write error", __FUNCTION__);
+ return ESESTATUS_INVALID_RECEIVE_LENGTH;
+ }
phNxpEse_sCoreRecvBuff_List_t* newNode = NULL;
newNode = (phNxpEse_sCoreRecvBuff_List_t*)phNxpEse_memalloc(