diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-11-08 13:50:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-11-08 13:50:34 +0000 |
commit | a24539b71e946d69cc3d91f891db12399339d713 (patch) | |
tree | ef48542529660ccfb77274270e3ffbbea1093de1 /src/com | |
parent | 11b59edfb4644753aea6a10b23ca58ba3db8f367 (diff) | |
parent | 7a9f2ad7234e716dc448e6e6c4d59673c16a6184 (diff) | |
download | Stk-a24539b71e946d69cc3d91f891db12399339d713.tar.gz |
Merge "Correct boundary check and add log."
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/stk/StkAppService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java index 305210b..4140d15 100644 --- a/src/com/android/stk/StkAppService.java +++ b/src/com/android/stk/StkAppService.java @@ -564,7 +564,10 @@ public class StkAppService extends Service implements Runnable { ((CatCmdMessage)msg.obj).getCmdType()!= null) { CatLog.d(LOG_TAG, "cmdName[" + ((CatCmdMessage)msg.obj).getCmdType().name() + "]"); } - if (slotId > mStkContext.length || mStkContext[slotId] == null) return; + if (slotId >= mStkContext.length || mStkContext[slotId] == null) { + CatLog.d(LOG_TAG, "invalid slotId " + slotId); + return; + } mStkContext[slotId].mOpCode = opcode; switch (opcode) { |