|
|
@ -263,13 +263,17 @@ parseAarqPdu(AcseConnection* self, uint8_t* buffer, int bufPos, int maxBufPos)
|
|
|
|
int authMechLen = 0;
|
|
|
|
int authMechLen = 0;
|
|
|
|
bool userInfoValid = false;
|
|
|
|
bool userInfoValid = false;
|
|
|
|
|
|
|
|
|
|
|
|
while (bufPos < maxBufPos) {
|
|
|
|
while (bufPos < maxBufPos)
|
|
|
|
|
|
|
|
{
|
|
|
|
uint8_t tag = buffer[bufPos++];
|
|
|
|
uint8_t tag = buffer[bufPos++];
|
|
|
|
int len;
|
|
|
|
int len;
|
|
|
|
|
|
|
|
|
|
|
|
bufPos = BerDecoder_decodeLength(buffer, &len, bufPos, maxBufPos);
|
|
|
|
bufPos = BerDecoder_decodeLength(buffer, &len, bufPos, maxBufPos);
|
|
|
|
|
|
|
|
|
|
|
|
if (bufPos < 0) {
|
|
|
|
if (len == 0)
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((bufPos < 0) || (bufPos + len > maxBufPos)) {
|
|
|
|
if (DEBUG_ACSE)
|
|
|
|
if (DEBUG_ACSE)
|
|
|
|
printf("ACSE: Invalid PDU!\n");
|
|
|
|
printf("ACSE: Invalid PDU!\n");
|
|
|
|
return ACSE_ASSOCIATE_FAILED;
|
|
|
|
return ACSE_ASSOCIATE_FAILED;
|
|
|
|