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)

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/29085
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I4d7fc44fde5b900907ec5ebec0450040a764802a
Gerrit-Change-Number: 29085
Gerrit-PatchSet: 9
Gerrit-Owner: msuraev <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: msuraev <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-MessageType: merged

Reply via email to