Skip to content

association only with specified values for TSelector, PSelector, and SSelector #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v1.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/mms/iso_cotp/cotp.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,14 @@ parseOptions(CotpConnection* self, uint8_t* buffer, int bufLen)
if (optionLen < 5) {
self->options.tSelDst.size = optionLen;

const uint8_t TransportSelectorConstValue[4] = {0,1,0,0};
int i;
for (i = 0; i < optionLen; i++)
{
self->options.tSelDst.value[i] = buffer[bufPos++];
if(TransportSelectorConstValue[i] != self->options.tSelDst.value[i])
return false;
}
}
else
goto cpo_error;
Expand Down
5 changes: 5 additions & 0 deletions src/mms/iso_presentation/iso_presentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,14 @@ parseNormalModeParameters(IsoPresentation* self, uint8_t* buffer, int totalLengt
}
else {
self->calledPresentationSelector.size = len;
const uint8_t PresentationSelectorConstValue[16] = {0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0};
int i;
for (i = 0; i < len; i++)
{
self->calledPresentationSelector.value[i] = buffer[bufPos + i];
if(PresentationSelectorConstValue[i] != self->calledPresentationSelector.value[i])
return -1;
}
}

bufPos += len;
Expand Down
5 changes: 5 additions & 0 deletions src/mms/iso_session/iso_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,14 @@ parseSessionHeaderParameters(IsoSession* session, ByteBuffer* message, int param
{
session->calledSessionSelector.size = parameterLength;

const uint8_t SessionSelectorConstValue[16] = {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int i;
for (i = 0; i < session->calledSessionSelector.size; i++)
{
session->calledSessionSelector.value[i] = message->buffer[offset++];
if(SessionSelectorConstValue[i] != session->calledSessionSelector.value[i])
return SESSION_ERROR;
}
}

break;
Expand Down