(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-distcc.c) |
| |
| 287 | | | dissect_distcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) |
| 288 | | | { |
| 289 | | | int offset=0; |
| 290 | | | proto_tree *tree=NULL; |
| 291 | | | proto_item *item=NULL; |
| 292 | | | char token[4]; |
| 293 | | | guint32 parameter; |
| 294 | | | |
| 295 | | | |
| 296 | [+] | | if (check_col(pinfo->cinfo, COL_PROTOCOL)) |
 |
| 297 | | | col_set_str(pinfo->cinfo, COL_PROTOCOL, "DISTCC "); |
| 298 | | | |
| 299 | [+] | | if (check_col(pinfo->cinfo, COL_INFO)) |
 |
| 300 | | | col_clear(pinfo->cinfo, COL_INFO); |
| 301 | | | |
| 302 | | | if (parent_tree) { |
Event 5:
Skipping " if". parent_tree evaluates to false.
hide
|
|
| 303 | | | item = proto_tree_add_item(parent_tree, proto_distcc, tvb, offset, |
| 304 | | | -1, FALSE); |
| 305 | | | tree = proto_item_add_subtree(item, ett_distcc); |
| 306 | | | } |
| 307 | | | |
| 308 | | | while(1){ |
Event 6:
Entering loop body. 1 evaluates to true.
hide
|
|
| 309 | | | |
| 310 | | | |
| 311 | [+] | | if(tvb_length_remaining(tvb, offset)<12){ |
 |
| 312 | | | return; |
| 313 | | | } |
| 314 | | | |
| 315 | | | |
| 316 | | | tvb_memcpy(tvb, token, offset, 4); |
| 317 | | | offset+=4; |
| 318 | | | |
| 319 | | | |
| 320 | | | sscanf(tvb_get_ptr(tvb, offset, 8), "%08x", ¶meter); |
Event 19:
__isoc99_sscanf() does not initialize parameter. - This may be because of a failure case or other special case for __isoc99_sscanf(). Consult the __isoc99_sscanf() documentation for more information.
hide
|
|
| 321 | | | offset+=8; |
| 322 | | | |
| 323 | | | if(!strncmp(token, "DIST", 4)){ |
Event 20:
Taking false branch. strncmp(token, "DIST", 4) evaluates to true.
hide
|
|
| 324 | | | offset=dissect_distcc_dist(tvb, pinfo, tree, offset, parameter); |
| 325 | | | } else if(!strncmp(token, "ARGC", 4)){ |
Event 21:
Taking false branch. strncmp(token, "ARGC", 4) evaluates to true.
hide
|
|
| 326 | | | offset=dissect_distcc_argc(tvb, pinfo, tree, offset, parameter); |
| 327 | | | } else if(!strncmp(token, "ARGV", 4)){ |
Event 22:
Taking false branch. strncmp(token, "ARGV", 4) evaluates to true.
hide
|
|
| 328 | | | offset=dissect_distcc_argv(tvb, pinfo, tree, offset, parameter); |
| 329 | | | } else if(!strncmp(token, "DOTI", 4)){ |
Event 23:
Taking false branch. strncmp(token, "DOTI", 4) evaluates to true.
hide
|
|
| 330 | | | offset=dissect_distcc_doti(tvb, pinfo, tree, offset, parameter); |
| 331 | | | } else if(!strncmp(token, "DONE", 4)){ |
Event 24:
Taking true branch. strncmp(token, "DONE", 4) evaluates to false.
hide
|
|
| 332 | | | offset=dissect_distcc_done(tvb, pinfo, tree, offset, parameter); |
Uninitialized Variable
parameter was not initialized. The issue can occur if the highlighted code executes. See related event 19. Show: All events | Only primary events |
|
| |