Attention is currently required from: fixeria, laforge.
1 comment:
File src/sccp.c:
Patch Set #1, Line 167: return 0;
hmm all callers do […]
Ah, here is a hint. The loop apparently parses *a series* of optional data, so if the first succeeded, what to return if the second fails / if there are some surplus bytes / the list is not properly terminated. Do we want to rather continue to evaluate what we have, or fail the entire packet.
Also if there can ever be multiple optional data, this function only returns the valid *last* entry.
Also all callers explicitly memset(0) the return data, because if there is no optional data, this function just returns 0 without setting the return value.
There seems to be a whole bunch of things we should fix about this function.
Should it support multiple Optional Data, or just error on multiple entries?
I haven't yet seen an SCCP packet with more than one optional data...
thoughts?
To view, visit change 37994. To unsubscribe, or for help writing mail filters, visit settings.