Fix for incorrect timeout value for large timeouts am: 8fb921434e am: c74aa50910 am: 0f1c9fd1ce am: d1cce0bf86 am: 4d7dcc951c

Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/weaver/+/2683226

Change-Id: I7fbc813a8e8f08d5a303859d69e2b6aaa80f5b00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libese_weaver/src/weaver-parser-impl.cpp b/libese_weaver/src/weaver-parser-impl.cpp
index e00542c..229a349 100644
--- a/libese_weaver/src/weaver-parser-impl.cpp
+++ b/libese_weaver/src/weaver-parser-impl.cpp
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- *  Copyright 2020, 2022 NXP
+ *  Copyright 2020, 2022-2023 NXP
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -342,9 +342,9 @@
       /* datasize value should be 6 as 4 bytes for time out + 2 bytes for failure count */
       if (*readOffset++ == (sizeof(getDataInfo.timeout) +
             sizeof(getDataInfo.failure_count))) {
-        getDataInfo.timeout =  *readOffset++ << BYTE3_MSB_POS;
+        getDataInfo.timeout =  *readOffset++ << BYTE1_MSB_POS;
         getDataInfo.timeout |= *readOffset++ << BYTE2_MSB_POS;
-        getDataInfo.timeout |= *readOffset++ << BYTE1_MSB_POS;
+        getDataInfo.timeout |= *readOffset++ << BYTE3_MSB_POS;
         getDataInfo.timeout |= *readOffset++;
         getDataInfo.failure_count = *readOffset++ << BYTE3_MSB_POS;
         getDataInfo.failure_count |= *readOffset;