Attention is currently required from: fixeria, laforge.

neels has posted comments on this change by neels. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/37994?usp=email )

Change subject: coverity CID#272968 CID#272939
......................................................................


Patch Set 1:

(1 comment)

File src/sccp.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/37994/comment/6e0270a2_d09eb640?usp=email
 :
PS1, Line 167: return 0;
> I'd agree.
i picked 0 because below it says

                if (read + 1 >= room) {
                        LOGP(DSCCP, LOGL_ERROR, "no place for length\n");
                        return 0;
                }

and other places also return 0 for length errors.

so are you guys sure?
I think this function returns the number of bytes processed, and it being 
static means that it may be very specialized to work with rc == 0.

It also returns -1 right at the bottom, so it seems to be pick n choose



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

Gerrit-MessageType: comment
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ic6823cf077ef15ef1f6e209bf53384913911f93e
Gerrit-Change-Number: 37994
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-CC: laforge <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Comment-Date: Tue, 03 Sep 2024 23:46:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <[email protected]>
Comment-In-Reply-To: fixeria <[email protected]>

Reply via email to