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?... : 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