diff options
Diffstat (limited to 'arm-wt-22k/lib_src')
-rw-r--r-- | arm-wt-22k/lib_src/eas_xmf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arm-wt-22k/lib_src/eas_xmf.c b/arm-wt-22k/lib_src/eas_xmf.c index 05b329e..5b398c4 100644 --- a/arm-wt-22k/lib_src/eas_xmf.c +++ b/arm-wt-22k/lib_src/eas_xmf.c @@ -27,6 +27,8 @@ *---------------------------------------------------------------------------- */ +#include <log/log.h> + #include "eas_data.h" #include "eas_miditypes.h" #include "eas_parser.h" @@ -646,6 +648,11 @@ static EAS_RESULT XMF_ReadNode (EAS_HW_DATA_HANDLE hwInstData, S_XMF_DATA *pXMFD for ( ; numItems > 0; numItems--) { /* process this item */ + if (offset <= nodeOffset) { + ALOGE("b/36725407: parser did not advance"); + return EAS_ERROR_FILE_FORMAT; + } + if ((result = XMF_ReadNode(hwInstData, pXMFData, offset, &length)) != EAS_SUCCESS) return result; |