diff options
author | Marco Nelissen <marcone@google.com> | 2017-05-12 21:39:15 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-12 21:39:15 +0000 |
commit | 219f65ba814e9e99681bac0c47d9734cecaf576c (patch) | |
tree | a3ec184d5cc7a41addf1785cfed92d400c0c77d7 | |
parent | 6a04069ea69d2c1c77a999dd5cb45e9eb1479351 (diff) | |
parent | 3454ab70d6190d20981fc79b8ccbc7f705b62694 (diff) | |
download | sonivox-219f65ba814e9e99681bac0c47d9734cecaf576c.tar.gz |
Merge "Fix infinite recursion" into klp-dev am: 45712137ea am: e49d1304e7 am: 6483a95ccf am: bb6bfa8f5a am: e090def747 am: cd0a4ac609
am: 3454ab70d6
Change-Id: I515d19bf071c252b57d28da9dacb77eb2ecbf0eb
-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; |