Revert "Fix integer overflow in NDEF_MsgValidate."
This reverts commit 94d465dc1e3fe5caa1d38bbd7eea3cb070471bb6.
Reason for revert: Breaking the build
Change-Id: Ic6ec025faee11075d976fd67c5bcd19167e87a00
diff --git a/src/nfc/ndef/ndef_utils.c b/src/nfc/ndef/ndef_utils.c
index ec1a88b..01663f0 100644
--- a/src/nfc/ndef/ndef_utils.c
+++ b/src/nfc/ndef/ndef_utils.c
@@ -23,8 +23,6 @@
*
******************************************************************************/
#include "ndef_utils.h"
-#include <log/log.h>
-#include <stddef.h>
#include <string.h>
/*******************************************************************************
@@ -197,13 +195,6 @@
}
}
- /* Check for integer overflow */
- if (((uint32_t)(~0U) - (uint32_t)(type_len + id_len)) < payload_len ||
- ((uint8_t*)(~0U) - p_rec) < (size_t)(payload_len + type_len + id_len)) {
- android_errorWriteLog(0x534e4554, "126200054");
- return (NDEF_MSG_LENGTH_MISMATCH);
- }
-
/* Point to next record */
p_rec += (payload_len + type_len + id_len);