Wireshark-bugs: [Wireshark-bugs] [Bug 8070] Patch for packet-coap.c
Date: Mon, 03 Feb 2014 00:23:50 +0000

Comment # 21 on bug 8070 from
(In reply to comment #19)
> 2nd question:
>   In the code below in dissect_coap_opt_uri_query(),
>   if 'opt_length' == 0 then 'coap_uri_query' will be
>   concatenated with a '?' or '&' by itself without the string "(null)".
>   Is this as intended ? 
>   (This is similar to what is done in dissect_coap_opt_uri_path()).
>    
> 
> 	if (coap_uri_query[0] == '\0')
> 		g_strlcat(coap_uri_query, "?", sizeof(coap_uri_query));
> 	else
> 		g_strlcat(coap_uri_query, "&", sizeof(coap_uri_query));
> 
> 	if (opt_length == 0) {
> 		str = nullstr;
> 	} else {
> 		str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
> 		g_strlcat(coap_uri_str, str, sizeof(coap_uri_str));
> 	}

Yes, intended.  coap_uri_query is intended to show the whole query string
concatinated.  "str" is the buffer to show the option itself.  "str" only takes
a nullstr.


You are receiving this mail because:
  • You are watching all bug changes.