(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-infiniband.c) |
| |
| 2937 | | | static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo) |
| 2938 | | | { |
| 2939 | | | guint8 lnh_val = 0; |
| 2940 | | | gboolean bthFollows = 0; |
| 2941 | | | guint8 virtualLane = 0; |
| 2942 | | | guint8 opCode = 0; |
| 2943 | | | gint32 = -1; |
| 2944 | | | guint8 nxtHdr = 0; |
| 2945 | | | struct e_in6_addr SRCgid; |
| 2946 | | | struct e_in6_addr DSTgid; |
| 2947 | | | guint8 management_class = 0; |
| 2948 | | | MAD_Data MadData; |
| 2949 | | | |
| 2950 | | | |
| 2951 | | | virtualLane = tvb_get_guint8(tvb, offset); |
| 2952 | | | virtualLane = virtualLane & 0xF0; |
| 2953 | | | offset+=1; |
| 2954 | | | |
| 2955 | | | |
| 2956 | | | lnh_val = tvb_get_guint8(tvb, offset); |
| 2957 | | | lnh_val = lnh_val & 0x03; |
| 2958 | | | offset+=1; |
| 2959 | | | |
| 2960 | | | |
| 2961 | [+] | | if (check_col(pinfo->cinfo, COL_DEF_DST)) |
 |
| 2962 | | | { |
| 2963 | | | col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DLID: %s", tvb_bytes_to_str(tvb, offset, 2)); |
| 2964 | | | } |
| 2965 | | | offset+=4; |
| 2966 | | | |
| 2967 | | | |
| 2968 | [+] | | if (check_col(pinfo->cinfo, COL_DEF_SRC)) |
 |
| 2969 | | | { |
| 2970 | | | col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SLID: %s", tvb_bytes_to_str(tvb, offset, 2)); |
| 2971 | | | } |
| 2972 | | | offset+=2; |
| 2973 | | | |
| 2974 | | | switch(lnh_val) |
Event 5:
lnh_val evaluates to 3.
hide
|
|
| 2975 | | | { |
| 2976 | | | case IBA_GLOBAL: |
| 2977 | | | offset +=6; |
| 2978 | | | nxtHdr = tvb_get_guint8(tvb, offset); |
| 2979 | | | offset += 2; |
| 2980 | | | |
| 2981 | | | tvb_get_ipv6(tvb, offset, &SRCgid); |
| 2982 | | | if (check_col(pinfo->cinfo, COL_DEF_SRC)) |
Event 6:
Skipping " if". check_col(...) evaluates to false.
hide
|
|
| 2983 | | | { |
| 2984 | | | col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SGID: %s", ip6_to_str(&SRCgid)); |
| 2985 | | | } |
| 2986 | | | offset += 16; |
| 2987 | | | |
| 2988 | | | tvb_get_ipv6(tvb, offset, &DSTgid); |
| 2989 | | | if (check_col(pinfo->cinfo, COL_DEF_DST)) |
Event 7:
Skipping " if". check_col(...) evaluates to false.
hide
|
|
| 2990 | | | { |
| 2991 | | | col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DGID: %s", ip6_to_str(&DSTgid)); |
| 2992 | | | } |
| 2993 | | | offset += 16; |
| 2994 | | | |
| 2995 | | | if(nxtHdr != 0x1B) |
Event 8:
Taking true branch. nxtHdr != 27 evaluates to true.
hide
|
|
| 2996 | | | { |
| 2997 | | | |
| 2998 | | | break; |
| 2999 | | | } |
| 3000 | | | |
| 3001 | | | |
| 3002 | | | |
| 3003 | | | |
| 3004 | | | |
| 3005 | | | case IBA_LOCAL: |
| 3006 | | | bthFollows = TRUE; |
| 3007 | | | |
| 3008 | | | |
| 3009 3019 |  | | [ Lines 3009 to 3019 omitted. ] |
| 3020 | | | col_set_str(pinfo->cinfo, COL_DEF_DST, "IPv6 over IB Packet"); |
| 3021 | | | col_set_fence(pinfo->cinfo, COL_DEF_DST); |
| 3022 | | | } |
| 3023 | | | break; |
| 3024 | | | case RAW: |
| 3025 | | | break; |
| 3026 | | | default: |
| 3027 | | | break; |
| 3028 | | | } |
| 3029 | | | |
| 3030 | | | if(bthFollows) |
Event 9:
Skipping " if". bthFollows evaluates to false.
hide
|
|
| 3031 | | | { |
| 3032 | | | |
| 3033 | | | |
| 3034 | | | |
| 3035 | | | = ((guint32) opCode); |
| 3036 | | | switch() |
| 3037 | | | { |
| 3038 | | | case RDETH_DETH_PAYLD: |
| 3039 | | | offset += 4; |
| 3040 | | | offset += 8; |
| 3041 3115 |  | | [ Lines 3041 to 3115 omitted. ] |
| 3116 | | | offset += 4; |
| 3117 | | | break; |
| 3118 | | | case DETH_IMMDT_PAYLD: |
| 3119 | | | offset += 8; |
| 3120 | | | offset += 4; |
| 3121 | | | break; |
| 3122 | | | default: |
| 3123 | | | break; |
| 3124 | | | } |
| 3125 | | | } |
| 3126 | | | if(virtualLane == 0xF0) |
Event 10:
Taking true branch. virtualLane == 240 evaluates to true.
hide
|
|
| 3127 | | | { |
| 3128 | [+] | | management_class = tvb_get_guint8(tvb, offset + 1); |
 |
| 3129 | | | if(((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END)) |
| 3130 | | | || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END))) |
| 3131 | | | { |
| 3132 | | | return; |
| 3133 | | | } |
| 3134 | | | else if((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END)) |
Event 16:
Taking false branch. management_class >= (guint8)16 evaluates to false.
hide
|
|
| 3135 | | | { |
| 3136 | | | return; |
| 3137 | | | } |
| 3138 | | | else if(((management_class == (guint8)0x00) || (management_class == (guint8)0x02)) |
| 3139 | | | || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80)) |
| 3140 | | | || ((management_class >= (guint8)0x82))) |
| 3141 | | | { |
| 3142 | | | return; |
| 3143 | | | } |
| 3144 | | | else |
| 3145 | | | { |
| 3146 | [+] | | parse_MAD_Common(NULL, tvb, &offset, &MadData); |
Event 18:
parse_MAD_Common() does not initialize MadData. - This may be because of a failure case or other special case for parse_MAD_Common().
hide
|
|
 |
| 3147 | [+] | | label_SUBM_Method(NULL, &MadData, pinfo); |
Event 21:
label_SUBM_Method() does not initialize MadData. - This may be because of a failure case or other special case for label_SUBM_Method().
hide
|
|
 |
| 3148 | [+] | | label_SUBM_Attribute(NULL, &MadData, pinfo); |
Event 23:
&MadData is passed to label_SUBM_Attribute() as the second argument.
hide
Event 24:
label_SUBM_Attribute() does not initialize MadData. - This may be because of a failure case or other special case for label_SUBM_Attribute().
hide
|
|
 |
| |