msuraev has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/29085 )
Change subject: SCCP: Log more data on CR size error ......................................................................
SCCP: Log more data on CR size error
Related: OS#5579 Change-Id: I4d7fc44fde5b900907ec5ebec0450040a764802a --- M src/sccp.c 1 file changed, 5 insertions(+), 3 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/src/sccp.c b/src/sccp.c index 94eca29..ecab9ab 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -843,9 +843,11 @@ uint8_t extra_size = 3 + 1; int called_len;
- if (l3_data && (l3_length < 3 || l3_length > SCCP_MAX_OPTIONAL_DATA)) { - LOGP(DSCCP, LOGL_ERROR, "Invalid amount of data... %zu\n", l3_length); - return NULL; + if (l3_data) { + if (l3_length < 3 || l3_length > SCCP_MAX_OPTIONAL_DATA) { + LOGP(DSCCP, LOGL_ERROR, "Invalid amount of data... %zu\n", l3_length); + return NULL; + } }
if (l3_data)