(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/rtp_analysis.c) |
| |
| 3498 | | | static gboolean process_node(proto_node *ptree_node, *hfinformation, |
| 3499 | | | const gchar* proto_field, guint32* p_result) |
| 3500 | | | { |
| 3501 | | | field_info *finfo; |
| 3502 | | | proto_node *proto_sibling_node; |
| 3503 | | | *hfssrc; |
| 3504 | | | ipv4_addr *ipv4; |
| 3505 | | | |
| 3506 | | | finfo = PITEM_FINFO(ptree_node); |
| 3507 | | | |
| 3508 | | | if (hfinformation==(finfo->hfinfo)) { |
| 3509 | | | hfssrc = proto_registrar_get_byname(proto_field); |
| 3510 | | | if (hfssrc == NULL) |
| 3511 | | | return FALSE; |
| 3512 | | | for(ptree_node=ptree_node->first_child; ptree_node!=NULL; |
| 3513 | | | ptree_node=ptree_node->next) { |
| 3514 | | | finfo=PITEM_FINFO(ptree_node); |
| 3515 | | | if (hfssrc==finfo->hfinfo) { |
| 3516 | | | if (hfinformation->type==FT_IPv4) { |
| 3517 | | | ipv4 = fvalue_get(&finfo->value); |
| 3518 | | | *p_result = ipv4_get_net_order_addr(ipv4); |
| 3519 | | | } |
| 3520 | | | else { |
| 3521 | | | *p_result = fvalue_get_uinteger(&finfo->value); |
| 3522 | | | } |
| 3523 | | | return TRUE; |
| 3524 | | | } |
| 3525 | | | } |
| 3526 | | | if(!ptree_node) |
Redundant Condition
ptree_node always evaluates to false. This may be because: - There is a constant assignment to one or more of the variables involved.
- An earlier conditional statement has already ensured that ptree_node cannot be true.
- A crashing bug occurs on every path where ptree_node could have evaluated to true. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 3527 | | | return FALSE; |
| 3528 | | | } |
| 3529 | | | |
| 3530 | | | proto_sibling_node = ptree_node->next; |
| 3531 | | | |
| 3532 | | | if (proto_sibling_node) { |
| 3533 | | | return process_node(proto_sibling_node, hfinformation, proto_field, p_result); |
| 3534 | | | } |
| 3535 | | | else |
| 3536 | | | return FALSE; |
| 3537 | | | } |
| |