Attention is currently required from: fixeria, pespin.
neels has posted comments on this change by neels. (
https://gerrit.osmocom.org/c/libosmo-netif/+/37992?usp=email )
Change subject: coverity
......................................................................
Patch Set 1:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-netif/+/37992/comment/63055690_9636139… :
PS1, Line 7: coverity
what CID#XXX?
yeah i lost the CID and thought
well whatever, that web interface is so so slow... i have to look it up now anyway.
File src/rtp.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/37992/comment/bd16546b_8204736… :
PS1, Line 120: payload_len = ((int)msg->len) - sizeof(struct rtp_hdr) - csrc_len;
are you sure this is needed? you already had an int
csrc_len in the line, and you still have a unsig […]
I think I misunderstood what
coverity was complaining about.
(
I also just learned that, after all, implicit type casts in C work differently than I
thought I absolutely knew.
I always thought the implicit casting starts from the left operand, except for
assignments.. so i my world this calculation would be done in uint16_t, and only later
assigned to an int. So the result would never be negative. My little test program taught
me otherwise, i'm a bit confused now.
So how *does* C order the implicit casts?
I have certainly had many many numeric range and signedness bugs that were fixed by
casting the leftmost operand to the intended type. Do these bugs happen only with types
larger than int, maybe? did i completely misunderstand this back as a teenager and it
always worked out for me by random?
)
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/37992?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I30beeac45ff2d8c08905986af9fabfda071ddc5b
Gerrit-Change-Number: 37992
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Sep 2024 00:34:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>