MNCC data size check: allow trailing data
Verify is the parsed data is at least the size of the struct, not exactly the size. Make it accept messages with additional data, like the SDP information the TTCN-3 testsuite is sending since Ic9568c8927507e161aadfad1a4d20aa896d8ae30. This change makes the size checks consistent with the other size checks in MNCC implementations such as osmo-sip-connector Related: OS#4282 Related: osmo-sip-connector I522ce7f206932a816a64f03d916799c3215bb8c7 Change-Id: Ic8c24e6988ae2d3c4278c4adccae46e248c893b8
This commit is contained in:
parent
bd5ec5ff0f
commit
066fae266a
|
@ -142,7 +142,7 @@ class MnccSocket(MnccSocketBase):
|
||||||
'(0x%04x vs 0x%04x)\n' % (msg.version, mncc.MNCC_SOCK_VERSION))
|
'(0x%04x vs 0x%04x)\n' % (msg.version, mncc.MNCC_SOCK_VERSION))
|
||||||
|
|
||||||
# Match expected message sizes / offsets
|
# Match expected message sizes / offsets
|
||||||
if (msg.mncc_size != ctypes.sizeof(mncc.gsm_mncc) or
|
if (msg.mncc_size < ctypes.sizeof(mncc.gsm_mncc) or
|
||||||
msg.data_frame_size != ctypes.sizeof(mncc.gsm_data_frame) or
|
msg.data_frame_size != ctypes.sizeof(mncc.gsm_data_frame) or
|
||||||
msg.called_offset != mncc.gsm_mncc.called.offset or
|
msg.called_offset != mncc.gsm_mncc.called.offset or
|
||||||
msg.signal_offset != mncc.gsm_mncc.signal.offset or
|
msg.signal_offset != mncc.gsm_mncc.signal.offset or
|
||||||
|
|
Loading…
Reference in New Issue