Check chunk size am: f01750adb0 am: 490b0166e5 am: 0931c97d8b am: e310bc6de1 am: 17c6385573 am: 7eaccb36d5 am: bea0a08ed7 am: 6a04069ea6 am: 271822a5ee am: f997858e13 am: fa83d8eb74
am: cef17a21f6
Change-Id: Ib01b4cb3c64b5f353c33a7789ec7be0cf9efc779
diff --git a/arm-wt-22k/lib_src/eas_mdls.c b/arm-wt-22k/lib_src/eas_mdls.c
index 296d783..8097ba4 100644
--- a/arm-wt-22k/lib_src/eas_mdls.c
+++ b/arm-wt-22k/lib_src/eas_mdls.c
@@ -785,6 +785,11 @@
if ((result = EAS_HWGetDWord(pDLSData->hwInstData, pDLSData->fileHandle, pSize, EAS_FALSE)) != EAS_SUCCESS)
return result;
+ if (*pSize < 0) {
+ ALOGE("b/37093318");
+ return EAS_ERROR_FILE_FORMAT;
+ }
+
/* get form type for RIFF and LIST types */
if ((*pChunkType == CHUNK_RIFF) || (*pChunkType == CHUNK_LIST))
{