diff options
author | Marco Nelissen <marcone@google.com> | 2017-05-12 21:36:14 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-12 21:36:14 +0000 |
commit | 3454ab70d6190d20981fc79b8ccbc7f705b62694 (patch) | |
tree | a3ec184d5cc7a41addf1785cfed92d400c0c77d7 | |
parent | bea0a08ed78a37e53cc4b93e7be0e1fdbf43936f (diff) | |
parent | cd0a4ac6098051db644c19da430871463c3a79ef (diff) | |
download | sonivox-3454ab70d6190d20981fc79b8ccbc7f705b62694.tar.gz |
Merge "Fix infinite recursion" into klp-dev am: 45712137ea am: e49d1304e7 am: 6483a95ccf am: bb6bfa8f5a am: e090def747
am: cd0a4ac609
Change-Id: I558701ee329b4a5c31c39a43eee71cf71f1bfd18
-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 830b6e5..169eb7e 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" @@ -649,6 +651,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; |