Hi,
You may have a point there. Would you open a bug for that in the Wireshark bug
database (https://bugs.wireshark.org)? That way it won't be forgotten.
Thanx,
Jaap
Michael Lum wrote:
> Hello,
>
> (Source is from 1.0.4)
>
> I was looking through tap-rtp-common.c because I wanted
> to add some CODECs when I noticed what I think is a bug.
>
> In this function:
>
> static guint32
> get_dyn_pt_clock_rate(gchar *payload_type_str)
> {
> size_t i;
>
> for (i = 0; i < NUM_DYN_CLOCK_VALUES; i++) {
> if
> (g_ascii_strncasecmp(mimetype_and_clock_map[i].pt_mime_name_str,payload_
> type_str,(strlen(mimetype_and_clock_map[i].pt_mime_name_str))) == 0)
> return mimetype_and_clock_map[i].value;
> }
>
> return 1;
> }
>
> Here's the first 2 entries in the array:
>
> static const mimetype_and_clock mimetype_and_clock_map[] = {
> {"AMR", 8000}, /* [RFC3267] */
> {"AMR-WB", 16000}, /* [RFC3267] */
>
> So if 'payload_type_str' is equal to 'AMR-WB' I believe the first match
> will be 'AMR' and the
> returned clock rate of 8000 will be incorrect.
>
> Wouldn't my example be the equivalent to
>
> strncasecmp("AMR", "AMR-WB", 3)
>
> ?
>
> Thanks.
_______________________________________________
Wireshark-dev mailing list
[email protected]
https://wireshark.org/mailman/listinfo/wireshark-dev