Attention is currently required from: fixeria, pespin.
2 comments:
Commit Message:
Patch Set #1, 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:
Patch Set #1, 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 change 37992. To unsubscribe, or for help writing mail filters, visit settings.