Text   |  XML   |  ReML   |   Visible Warnings:

Ignored Return Value  at packet-h248.c:1179

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

h248_param_PkgdName

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-h248.c)expand/collapse
Show more  
 1167  extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u1 _U_, void* u2 _U_) {
 1168    tvbuff_t *new_tvb = NULL;
 1169    proto_tree *package_tree=NULL;
 1170    guint16 name_major, name_minor;
 1171    int old_offset;
 1172    const h248_package_t* pkg = NULL;
 1173    guint i;
 1174    int offset = 0;
 1175    asn1_ctx_t asn1_ctx;
 1176    asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 1177   
 1178          old_offset=offset;
 1179          offset = dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hfid , &new_tvb);
 1180   
 1181    if (new_tvb) {
 1182      /* this field is always 4 bytes  so just read it into two integers */
 1183      name_major=tvb_get_ntohs(new_tvb, 0);
 1184      name_minor=tvb_get_ntohs(new_tvb, 2);
 1185   
 1186      /* do the prettification */
 1187      proto_item_append_text(asn1_ctx.created_item, "  %s (%04x)", val_to_str(name_major, package_name_vals, "Unknown Package"), name_major);
 1188   
 1189      if(tree){
 1190          proto_item* pi;
 1191          const gchar* strval;
 1192   
 1193          package_tree = proto_item_add_subtree(asn1_ctx.created_item, ett_packagename);
 1194          proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
 1195   
 1196          for(i=0; i < packages->len; i++) {
 1197                  pkg = g_ptr_array_index(packages,i);
 1198   
 1199                  if (name_major == pkg->id) {
 1200                          break;
 1201                  } else {
 1202                          pkg = NULL;
 1203                  }
 1204          }
 1205   
 1206          if (! pkg ) pkg = &no_package;
 1207   
 1208   
 1209          pi = proto_tree_add_uint(package_tree, hf_248_pkg_param, tvb, offset-2, 2, name_minor);
 1210   
 1211          if (pkg->signal_names && ( strval = match_strval(name_minor, pkg->signal_names) )) {
 1212                  strval = ep_strdup_printf("%s (%d)",strval,name_minor);
 1213          } else {
 1214                  strval = ep_strdup_printf("Unknown (%d)",name_minor);
 1215          }
 1216   
 1217          proto_item_set_text(pi,"Signal ID: %s", strval);
 1218          }
 1219   
 1220    }
 1221  }
Show more  




Change Warning 5242.35600 : Ignored Return Value

Priority:
State:
Finding:
Owner:
Note: