If an ACR list is split over multiple responses, AcrListResponse#getAcrListData uses BerTlvData#getData to get the array extra responses after the first should be copied into. However, since BerTlvData#getData returns a copy of the array and not the actual array, the copies have no effect.
Fix by implementing BerTlvData#addData, which copies data to the correct position and increments the index pointer in one go, and adjust AcrListResponse#getAcrListData to use it.
Also, remove BerTlvData#setCurrentIndex so that the atomic BerTlvData#addData must be used instead.
If an ACR list is split over multiple responses,
AcrListResponse#getAcrListData
usesBerTlvData#getData
to get the array extra responses after the first should be copied into. However, sinceBerTlvData#getData
returns a copy of the array and not the actual array, the copies have no effect.Fix by implementing
BerTlvData#addData
, which copies data to the correct position and increments the index pointer in one go, and adjustAcrListResponse#getAcrListData
to use it.Also, remove
BerTlvData#setCurrentIndex
so that the atomicBerTlvData#addData
must be used instead.Before:
After: