(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-wsp.c) |
| |
| 5483 | | | add_uri (proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, |
| 5484 | | | guint URILenOffset, guint URIOffset, proto_item *proto_ti) |
| 5485 | | | { |
| 5486 | | | proto_item *ti; |
| 5487 | | | |
| 5488 | | | guint count = 0; |
| 5489 | | | guint uriLen = tvb_get_guintvar (tvb, URILenOffset, &count); |
| 5490 | | | gchar *str = NULL; |
| 5491 | | | |
| 5492 | | | if (tree) |
| 5493 | | | ti = proto_tree_add_uint (tree, , |
| 5494 | | | tvb, URILenOffset, count, uriLen); |
| 5495 | | | |
| 5496 | | | tvb_ensure_bytes_exist(tvb, URIOffset, uriLen); |
| 5497 | | | if (tree) |
| 5498 | | | ti = proto_tree_add_item (tree, , |
| 5499 | | | tvb, URIOffset, uriLen, bo_little_endian); |
| 5500 | | | |
| 5501 | | | str = tvb_format_text (tvb, URIOffset, uriLen); |
Ignored Return Value
The return value of tvb_format_text() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- The return value of tvb_format_text() is checked 100% of the time in this project. CodeSonar is configured to enforce Ignored Return Value checks for any function whose return value is checked at least 96% of the time, unless the function is used fewer than 20 times. (To modify these thresholds, use configuration file parameters RETURN_CHECKER_SAMPLE_SIZE and RETURN_CHECKER_RATIO. To exempt tvb_format_text() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 5502 | | | |
| 5503 | | | |
| 5504 | | | |
| 5505 | | | if (check_col(pinfo->cinfo, COL_INFO)) { |
Event 2:
Skipping " if". check_col(...) evaluates to false.
hide
|
|
| 5506 | | | col_append_fstr(pinfo->cinfo, COL_INFO, " %s", str); |
| 5507 | | | } |
| 5508 | | | if (proto_ti) |
Event 3:
Skipping " if". proto_ti evaluates to false.
hide
|
|
| 5509 | | | proto_item_append_text(proto_ti, ", URI: %s", str); |
| 5510 | | | } |
| |