Text   |  XML   |  ReML   |   Visible Warnings:

Null Test After Dereference  at packet-asn1.c:4823

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

getPDUprops

(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/asn1/packet-asn1.c)expand/collapse
Show more  
 4283  static PDUprops *
 4284  getPDUprops(PDUprops *out, guint offset, guint class, guint tag, guint cons)
 4285  {
 4286          statestack pos, pos2, save_pos;
 4287          PDUinfo *info;
 4288          const char *ret, *tmp;
 4289          int typeflags = 0, donext = 0, pushed = 0, cons_handled = 0;
 4290          static char namestr[64]; /* enough ? */
 4291          static char posstr[40];
 4292          static char noname[] = "*noname*";
 4293          static PDUprops constructed_save; /* for unexpectedly constructed enteties */
 4294   
 4295          if (PDUstatec > 0)      /* don't read from below the stack */
 4296                  pos = POPSTATE;
 4297          /* pos refers to the last asn1 node handled */
 4298   
 4299          /* a very simple, too simple??, way to handle constructed entities */
 4300          if ((PDUstatec > 0) && (pos.type & TBL_CONSTRUCTED)) {
 4301                          /* unexpectedly constructed, return same info as last time */
 4302                  g_sprintf(posstr, "==off=%d %c%d%c", offset, tag_class[class], tag, cons?'c':'p');
 4303                  showstack(&pos, posstr, 3);
 4304                  pos.offset = offset;
 4305                  pos.type &= ~TBL_CONSTRUCTED; /* remove the flag */
 4306                  PUSHNODE(pos);  /* push extra, to match with a EOI operation */
 4307                  PUSHNODE(pos);  /* restore the stack */
 4308                  *out = constructed_save;
 4309                  if (asn1_verbose)
 4310                          g_message("  return for constructed %s (%s)%s",
 4311                                    TBLTYPE(out->type), out->typename, out->name);
 4312                  return out;
 4313          }
 4314   
 4315          save_pos = pos; /* may need it again */
 4316   
 4317          out->type = 0;
 4318          out->name = 0;
 4319          out->typename = "*error*";
 4320          out->fullname = 0;
 4321          out->flags = 0;
 4322          out->data = 0;
 4323          out->value_id = -1;
 4324          out->type_id = -1;
 4325   
 4326          if (PDUstatec <= 0) {
 4327                  if (PDUstatec > -10) {
 4328                          if (asn1_verbose)
 4329                                  g_message(">>off=%d stack underflow, return", offset);
 4330                  }
 4331                  if (PDUstatec == -10) {
 4332                          if (asn1_verbose)
 4333                                  g_message(">>off=%d stack underflow, return, no more messages", offset);
 4334                  }
 4335                  out->name = "*underflow*";
 4336                  out->flags |= OUT_FLAG_noname;
 4337                  PDUerrcount++;
 4338                  return out;
 4339          }
 4340          g_sprintf(posstr, "==off=%d %c%d%c", offset, tag_class[class], tag, cons?'c':'p');
 4341   
 4342          showstack(&pos, posstr, 3);
 4343   
 4344          ret = noname;
 4345   
 4346          if (class == ASN1_EOI) { /* end of this input sequence */
 4347   
 4348                  if (pos.type & TBL_REFERENCE_pop) { /* reference finished, return to caller */
 4349                          if (asn1_verbose) g_message("    EOI: reference pop");
 4350                          pos = POPSTATE;
 4351                  } else 
 4352                  switch(pos.type & TBL_TYPEmask) {
 4353                  case TBL_TYPEREF:
 4354                          if (asn1_verbose) g_message("    EOI: pop typeref");
 4355                          pos = POPSTATE; /* remove typeref */
 4356                          break;
 4357                  case TBL_CHOICE_done:
 4358                          if (asn1_verbose) g_message("    EOI: mark choice");
 4359                          pos = POPSTATE;
 4360                          pos.type |= TBL_CHOICE_made; /* poropagate this up the stack */
 4361                          PUSHNODE(pos);
 4362                          break;
 4363                  default:
 4364                          break;
 4365                  }
 4366   
 4367   
 4368                  pos = POPSTATE; /* this is pushed back on the stack later */
 4369                  if (pos.node == NULL) {
 4370                          if (asn1_verbose) g_message("  EOI, pos.node == NULL");
 4371                          out->name = "*no-name-EOI*";
 4372                          out->flags |= OUT_FLAG_noname;
 4373                          PDUerrcount++;
 4374                          return out;
 4375                  }
 4376   
 4377                  info = getinfo(pos.node);
 4378                  ret = info->name;
 4379                  tmp = TBLTYPE(info->type);
 4380                  if (offset != pos.offset) {
 4381                          if (asn1_verbose)
 4382                                  g_message("  *EOI %s:%s mismatch, EOIoffset=%d, stack=%d",
 4383                                            tmp, ret, offset, pos.offset);
 4384                          while ((offset < pos.offset) && (PDUstatec > 0)) {
 4385                                  pos = POPSTATE;
 4386                                  if (asn1_verbose)
 4387                                          g_message("  EOI extra pop, EOIoffset=%d, stack=%d",
 4388                                                    offset, pos.offset);
 4389                          }
 4390                          if (offset != pos.offset)
 4391                                  PDUerrcount++; /* only count if still unequal */
 4392                  } else {
 4393                          if (asn1_verbose) g_message("  EOI %s:%s OK, offset=%d", tmp, ret, offset);
 4394                  }
 4395          } else {
 4396                  /* EOC is only present for indefinite length sequences, etc. end of sequence is always 
 4397                   * indicated by the synthetic EOI call. */
 4398                  if ((class == BER_CLASS_UNI) && (tag == BER_UNI_TAG_EOC)) { /* explicit EOC never has a name */
 4399                          PUSHNODE(pos); /* restore stack */
 4400                          ret = "explicit-EOC";
 4401                          if (asn1_verbose) g_message("  return '%s', ignore", ret);
 4402                          out->name = ret;
 4403                          out->typename = "ASN1";
 4404                          return out;
 4405                  }
 4406   
 4407                  /* find appropriate node for this tag */
 4408   
 4409                  if (pos.node == NULL) {
 4410                          if (asn1_verbose) g_message("  pos.node == NULL");
 4411                          out->name = "*no-name*";
 4412                          out->flags |= OUT_FLAG_noname;
 4413                          PDUerrcount++;
 4414                          return out;
 4415                  }
 4416   
 4417                  /* showNode(pos.node, 3, 4); */
 4418   
 4419                  switch (pos.type & TBL_TYPEmask) {
 4420                  case TBL_SEQUENCE: /* avoid finishing a choice when we have to do a sequence first */
 4421                  case TBL_SET:
 4422                          break;
 4423                  default:
 4424                          if (pos.type & TBL_CHOICE_made) {
 4425                                  if (asn1_verbose) g_message("    finish choice");
 4426                                  donext = 1;
 4427                          }
 4428                          break;
 4429                  }
 4430   
 4431                  info = getinfo(pos.node);
 4432   
 4433                  if (pos.type & TBL_REPEAT) { /* start of a repeat */
 4434                          switch(pos.type & TBL_TYPEmask) { /* type of previous node */
 4435                          case TBL_CHOICE:
 4436                                  if (asn1_verbose) g_message("    repeating choice"); /* ignore repeat */
 4437                                  break;
 4438                          default:
 4439                                  if (asn1_verbose) g_message("    seqof: repeat start");
 4440                                  /* decide how to continue, CHILD for next instance of sequence
 4441                                   * or NEXT for end of repeated sequence.
 4442                                   * use the tag to make a descision */
 4443                                  if (asn1_verbose) g_message("    seqof: first got %c%d, found %c%d",
 4444                                                          tag_class[class], tag,
 4445                                                          tag_class[info->tclass], info->tag);
 4446                                  if ( MATCH ) {
 4447                                          /* This is the start of repeating */
 4448                                          PUSHNODE(pos);
 4449                                          ret = getname(pos.node);
 4450                                          if (asn1_verbose) g_message("  return for repeat '%s'", ret);
 4451                                          out->type = (pos.type & TBL_TYPEmask);
 4452                                          out->typename = info->typename;
 4453                                          out->name = ret;
 4454                                          out->value_id = info->value_id;
 4455                                          out->type_id = info->type_id;
 4456                                          if (ISANONYMOUS) {
 4457                                                  if (asn1_verbose) g_message("    anonymous: dontshow");
 4458                                                  if (asn1_debug)
 4459                                                          out->flags |= OUT_FLAG_dontshow;
 4460                                                  else 
 4461                                                          out->name = empty;
 4462                                          }
 4463                                          return out;
 4464                                  } else {
 4465                                          /* find out where to go .... */
 4466                                          pos2 = pos;
 4467                                          CHILD;  /* assume sequence is repeated */
 4468                                          if (pos.node) {
 4469                                                  info = getinfo(pos.node);       /* needed for MATCH to look ahead */
 4470                                                  if (asn1_verbose)
 4471                                                      g_message("    seqof: child: got %c%d, found %c%d",
 4472                                                                tag_class[class], tag,
 4473                                                                tag_class[info->tclass], info->tag);
 4474                                          }
 4475                                          if (pos2.type & TBL_CHOICE_repeat) {
 4476                                                  pos = POPSTATE;
 4477                                                  if (asn1_verbose)
 4478                                                          g_message("    repeating a choice, %s",
 4479                                                                    getname(pos.node));
 4480                                                  pos.type = TBL_CHOICE_immediate;
 4481                                          } else {
 4482                                                  if ( pos.node && ! MATCH) { /* no, repeat ends, */
 4483                                                          donext = 1;     /* move on */
 4484                                                          if (asn1_verbose)
 4485                                                            g_message("    seqof: no repeat, force next");
 4486                                                  }
 4487                                                  /* following code will take the child again */
 4488                                                  pos = pos2;
 4489                                          }
 4490                                  }
 4491                                  break;
 4492                          }
 4493                  } else  if (pos.type & TBL_REFERENCE_pop) { /* reference finished, return to caller */
 4494                          if (asn1_verbose) g_message("    reference pop, donext");
 4495                          pos = POPSTATE;
 4496                          donext = 1;
 4497                  } else if (pos.type & TBL_SEQUENCE_done) { /* Children have been processed */
 4498                          if (pos.type & TBL_SEQUENCE_choice) {
 4499                                  pos = POPSTATE; /* expect to find a repeat here */
 4500                          } else {
 4501                                  donext = 1;
 4502                                  if (asn1_verbose) g_message("    sequence done, donext");
 4503                          }
 4504                  }
 4505   
 4506                  if (pos.type & TBL_REFERENCE) {
 4507                          if (asn1_verbose) g_message("    reference change ref -> pop");
 4508                          pos.type ^= (TBL_REFERENCE | TBL_REFERENCE_pop);
 4509                  }
 4510   
 4511                  pos.offset = offset;
 4512   
 4513                  ret = pos.name; /* for the debug messages */
 4514   
 4515                  if (donext) {
 4516                          if (asn1_verbose) g_message("    donext");
 4517                          NEXT;
 4518                  } else {
 4519                          switch(pos.type & TBL_TYPEmask) { /* type of previous node */
 4520                          case TBL_SETOF:         /* ?? */
 4521                          case TBL_SEQUENCEOF:
 4522                                  if ((pos.type & TBL_REPEAT) == 0) { /* start repeating */
 4523                                          pos.type |= TBL_REPEAT;
 4524                                          PUSHNODE(pos);
 4525                                          CHILD;
 4526                                          pushed++;
 4527                                                  /* remember this is the start of a repeat cycle */
 4528                                          typeflags |= TBL_REPEAT;
 4529                                          if (asn1_verbose)
 4530                                                  g_message("    seqof: set repeat mark [push,child]");
 4531                                  } else {
 4532                                          if (asn1_verbose)
 4533                                                  g_message("    seqof: end of repeat loop [next]");
 4534                                          NEXT;
 4535                                  }
 4536                                  break;
 4537                          case TBL_SET:           /* ?? */
 4538                          case TBL_SEQUENCE:
 4539                                  pos.type |= TBL_SEQUENCE_done;
 4540                                  PUSHNODE(pos);
 4541                                  CHILD;
 4542                                  pushed++;
 4543                                  if (asn1_verbose) g_message("    seq [push,child]");
 4544                                  break;
 4545                          case TBL_CHOICE:
 4546                                                  /* no more choice */
 4547                                  pos.type = (TBL_CHOICE_done | (pos.type & ~TBL_TYPEmask));
 4548                                  PUSHNODE(pos);
 4549   
 4550                                  pos.type = 0; /* clear all type flags */
 4551                                  if (asn1_verbose)
 4552                                          g_message("    choice [push], %c%d, %s",
 4553                                                    tag_class[info->tclass], info->tag, getname(pos.node));
 4554                                  pos.node = makechoice(pos.node, class, tag);
 4555                                  if (pos.node == NULL) {
 4556                                          pos = POPSTATE;
 4557                                          out->flags |= OUT_FLAG_noname;
 4558                                          PDUerrcount++;
 4559                                  }
 4560                                  info = getinfo(pos.node);
 4561   
 4562                                  ret = getname(pos.node);
 4563                                  if (asn1_verbose)
 4564                                          g_message("    '%s' %c%d will be used",
 4565                                                    ret, tag_class[info->tclass], info->tag);
 4566                                  break;
 4567                          case TBL_CHOICE_done:
 4568                                  NEXT;
 4569                                  break;
 4570                          case TBL_TYPEREF:
 4571                                  pos = POPSTATE;
 4572                                  NEXT;
 4573                                  if (asn1_verbose) g_message("    typeref [pop,next]");
 4574                                  break;
 4575                          case TBL_ENUMERATED:
 4576                          case TBL_BITSTRING:
 4577                                  /* skip named numbers now, call to PDUenum() will retrieve a name */
 4578                                  NEXT;
 4579                                  break;
 4580                          case TBL_CHOICE_immediate:
 4581                                  if (asn1_verbose) g_message("    immediate choice [no next]");
 4582                                  /* nothing */
 4583                                  break;
 4584                          default:
 4585                                  NEXT;
 4586                                  break;
 4587                          }
 4588                  }
 4589   
 4590                  if (pos.node == NULL) {
 4591                          ret = "*no-name-2*";
 4592                          if (asn1_verbose) g_message("  return '%s'", ret);
 4593                          out->name = ret;
 4594                          out->flags |= OUT_FLAG_noname;
 4595                          PDUerrcount++;
 4596                          return out;
 4597                  }
 4598                  ret = pos.name = getname(pos.node);
 4599                  pos.type = gettype(pos.node) | (pos.type & ~TBL_TYPEmask);
 4600                  info = getinfo(pos.node);
 4601   
 4602                  /* pos now points to the prospective current node, go check it ********************/
 4603                  if (asn1_verbose) g_message("  candidate %s '%s'%s%s, %c%d", TBLTYPE(pos.type), ret,
 4604                                  (ISOPTIONAL)?", optional":empty,
 4605                                  (ISIMPLICIT)?", implicit":empty,
 4606                                  tag_class[info->tclass], info->tag );
 4607   
 4608                  if (ISOPTIONAL) { /* must check the tag */
 4609                          while(! MATCH) {   /* check optional here again...? */
 4610                                  if (asn1_verbose)
 4611                                          g_message("    got %c%d, found %c%d", tag_class[class], tag,
 4612                                                          tag_class[info->tclass], info->tag);
 4613                                  NEXT;
 4614                                  if (pos.node == NULL) {
 4615                                          ret = "------";
 4616                                          if (cons) {
 4617                                                  pos = save_pos; /* reset for next time */
 4618                                                  pos.type |= TBL_SEQUENCE_done;
 4619                                                  PUSHNODE(pos);
 4620                                                  pos.type &= ~TBL_SEQUENCE_done;
 4621                                                  cons_handled = 1;
 4622                                                  out->flags |= OUT_FLAG_dontshow;
 4623                                                  if (asn1_verbose)
 4624                          g_message("    end of optional list, constructed, expect value next time");
 4625                                          } else {
 4626                                                  PDUerrcount++;
 4627                                                  out->flags |= OUT_FLAG_noname;
 4628                                                  if (asn1_verbose)
 4629                                                          g_message("    *end of optional list...");
 4630                                                  info = 0; /* this is not valid any more... */
 4631                                          }
 4632                                          break;  /* end of list */
 4633                                  }
 4634                                  info = getinfo(pos.node);
 4635                                  if (asn1_verbose) g_message("  optional, %s", getname(pos.node));
 4636                          }
 4637                          if (pos.node && ! cons_handled) {
 4638                                  ret = pos.name = getname(pos.node);
 4639                                  pos.type = gettype(pos.node);
 4640                          }
 4641                          /* pos now refers to node with name we want, optional nodes skipped */
 4642                  }
 4643   
 4644                  if (pos.type == TBL_CHOICE) { /* may be an immediate choice */
 4645                          pos2 = pos; /* save current state */
 4646                          if ( ! MATCH) {
 4647                                  if (! pushed) {
 4648                                          if (asn1_verbose)
 4649                                                  g_message("    already pushed, skip next push");
 4650                                          PUSHNODE(pos);
 4651                                          typeflags &= ~TBL_CHOICE_made;
 4652                                  }
 4653   
 4654                                  if (asn1_verbose && info)
 4655                                          g_message("    immediate choice [push], %c%d, %s",
 4656                                                    tag_class[info->tclass], info->tag, getname(pos.node));
 4657                                  if (pos.node) {
 4658                                          pos.node = makechoice(pos.node, class, tag);
 4659                                  }
 4660                                  if (pos.node == NULL) {
 4661                                          pos = POPSTATE;
 4662                                          PDUerrcount++;
 4663                                  }
 4664                                  info = getinfo(pos.node);
 4665                                  pos.type = gettype(pos.node);
 4666                                  out->type = (pos.type & TBL_TYPEmask);
 4667                                  out->flags |= OUT_FLAG_type;
 4668   
 4669                                  g_sprintf(namestr, "%s!%s", ret, getname(pos.node));
 4670                                  ret = namestr;
 4671                                  if (asn1_verbose)
 4672                                          g_message("    %s:%s will be used", TBLTYPE(pos.type), ret);
 4673                                  if (typeflags & TBL_REPEAT) {
 4674                                          pos2.type |= TBL_REPEAT | TBL_REPEAT_choice;
 4675                                          PUSHNODE(pos2);
 4676                                          pos.type |= TBL_SEQUENCE_choice;
 4677                                          PUSHNODE(pos);
 4678                                          if (asn1_verbose)
 4679                                                  g_message("  return from immediate choice [%s] '%s'",
 4680                                                                  TBLTYPE(pos.type), ret);
 4681   
 4682                                          out->data = pos.node; /* for access to named numbers... */
 4683   
 4684                                          out->type = (pos.type & TBL_TYPEmask);
 4685                                          out->name = ret;
 4686                                          if (info) {
 4687                                                  out->typename = info->typename;
 4688                                                  out->fullname = info->fullname;
 4689                                                  out->value_id = info->value_id;
 4690                                                  out->type_id = info->type_id;
 4691                                          }
 4692   
 4693                                          return out;
 4694                                  } else {
 4695                                          typeflags |= TBL_CHOICE_made;
 4696                                  }
 4697                          } else {
 4698                                  if (asn1_verbose) g_message("    matching choice '%s'", ret);
 4699                          }
 4700                          if ( ! cons ) { /* ISIMPLICIT was not OK for all */
 4701                                  pos = pos2; /* reset for continuation */
 4702                          }
 4703                  }
 4704                  if (asn1_verbose) {
 4705                          if (info)
 4706                                  g_message("  using: %s '%s'%s%s, %c%d", TBLTYPE(pos.type), ret,
 4707                                            (ISOPTIONAL)?", optional":empty,
 4708                                            (ISIMPLICIT)?", implicit":empty,
 4709                                            tag_class[info->tclass], info->tag );
 4710                          else 
 4711                                  g_message("  using: unknown '%s'", ret);
 4712                  }
 4713   
 4714                  /* must follow references now */
 4715                  if (pos.type == TBL_TYPEREF && info) {
 4716                          out->typename = info->typename;
 4717                          out->type_id = info->typenum;
 4718                          out->flags |= OUT_FLAG_typename;
 4719                          pos2 = pos;
 4720                          PUSHNODE(pos);  /* remember where we were */
 4721                          if (asn1_verbose) g_message("   typeref [push]");
 4722                          typeflags |= TBL_REFERENCE;
 4723                          if (info->reference == 0) { /* resolved ref to universal type.... */
 4724                                  /* showNode(pos.node, 3, 4); */
 4725                                  pos.type = gettype(pos.node); /* the resulting type */
 4726                                  info = getinfo(pos.node);
 4727                                  tmp = "inknown tag";
 4728                                  if ((info->tclass == BER_CLASS_UNI) && (info->tag < 31)) {
 4729                                          tmp = asn1_tag[info->tag];
 4730                                          pos.type = asn1_uni_type[info->tag]; /* get univsrsal type */
 4731                                  }
 4732                                  if (asn1_verbose && info)
 4733                                          g_message("  indirect typeref to %s:%s, %s [%c%d]",
 4734                                                    TBLTYPE(pos.type), info->typename, tmp,
 4735                                                    tag_class[info->tclass], info->tag );
 4736                          } else {
 4737                                  out->fullname = info->fullname;
 4738                                  donext = (ISANONYMOUS); /* refereing entity has no name ? */
 4739                                  pos.node = info->reference;
 4740                                  pos.type = gettype(pos.node);
 4741                                  info = getinfo(pos.node);
 4742                                  if (asn1_verbose)
 4743                                          g_message("  typeref %s %s", TBLTYPE(pos.type), getname(pos.node));
 4744                          /* keep name from before going through the reference, unless anonymous */
 4745                                  if (donext) /* refering entity has no name */
 4746                                          ret = getname(pos.node); /* a better name */
 4747   
 4748                                  /* handle choice here ? !!mm!! */
 4749   
 4750                                  out->type = (pos.type & TBL_TYPEmask);
 4751                                  out->flags |= OUT_FLAG_type;
 4752                                  /* showNode(pos.node, 3, 4); */
 4753                                  /* ret = getname(pos.node);*/
 4754   
 4755                                  out->data = pos.node;
 4756                                  out->flags |= OUT_FLAG_data;
 4757                                  if (asn1_verbose)
 4758                                          g_message("  typeref set named number list node %p", pos.node);
 4759   
 4760                                  if ( ! cons) {
 4761                                          pos = POPSTATE;
 4762                                          pos.type = TBL_TYPEREF_nopop;
 4763                                          if (asn1_verbose) g_message("    typeref pop");
 4764                                  } else if ((pos.type == TBL_ENUMERATED) || (pos.type == TBL_BITSTRING)){
 4765                                                  /* do not enter the named-number list */
 4766                                          pos = POPSTATE;
 4767                                          pos.type = TBL_TYPEREF_nopop;
 4768                                          if (asn1_verbose) g_message("    typeref [pop]");
 4769                                  } else {
 4770                                          typeflags |= TBL_REFERENCE;
 4771                                  }
 4772                          }
 4773                  }
 4774   
 4775                  if (cons && ! cons_handled) {   /* This entity is constructed, expected ? */
 4776                          switch(pos.type) {
 4777                          case TBL_BOOLEAN: /* these are not expected to be constructed */
 4778                          case TBL_INTEGER:
 4779                          case TBL_OCTETSTRING:
 4780                          case TBL_NULL:
 4781                          case TBL_OID:
 4782                          case TBL_REAL:
 4783                          case TBL_ENUMERATED:
 4784                          case TBL_TYPEREF:
 4785                                  typeflags |= TBL_CONSTRUCTED;
 4786                                          /* this entry has no extra info, next is the same */
 4787                                  out->flags |= (OUT_FLAG_dontshow | OUT_FLAG_constructed);
 4788                                  if (asn1_verbose) g_message("    dontshow and set constructed flag");
 4789                                  break;
 4790                          default: /* others, such as sequences, are expected to be constructed */
 4791                                  break;
 4792                          }
 4793                  }
 4794          }
 4795   
 4796          if (ISANONYMOUS) {
 4797                  if (asn1_verbose) g_message("    anonymous: dontshow");
 4798                  if (asn1_debug) /* this entry has no extra info, next is the same */
 4799                          out->flags |= OUT_FLAG_dontshow;
 4800                  else 
 4801                          out->name = empty; /* show it, but no name */
 4802          }
 4803   
 4804          if (out->name != empty)
 4805                  out->name = ret;
 4806   
 4807          if ( ! (out->flags & OUT_FLAG_data))
 4808                  out->data = pos.node; /* for access to named numbers... */
 4809   
 4810          pos.type |= typeflags;
 4811          PUSHNODE(pos);
 4812   
 4813          if ( ! (out->flags & OUT_FLAG_type))
 4814                  out->type = pos.type;
 4815   
 4816          out->type &= TBL_TYPEmask;
 4817   
 4818          if (ret == noname) {
 4819                  PDUerrcount++;
 4820                  out->flags |= OUT_FLAG_noname;
 4821          }
 4822   
 4823          if (info && ((out->flags & OUT_FLAG_typename) == 0)) {
 4824                  out->typename = info->typename;
 4825                  out->type_id = info->typenum;
 4826          }
 4827   
 4828          if (info && (out->value_id == -1)) {
 4829                  out->value_id = info->value_id;
 4830                  out->type_id = info->type_id;
 4831          }
 4832   
 4833          if ((out->fullname == 0) && info)
 4834                  out->fullname = info->fullname;
 4835   
 4836          if (typeflags & TBL_CONSTRUCTED)
 4837                  constructed_save = *out;
 4838   
 4839          if (asn1_verbose)
 4840                  g_message("  return [%s] '%s' vid=%d, tid=%d", TBLTYPE(out->type), out->name,
 4841                                                  out->value_id, out->type_id);
 4842   
 4843          return out;
 4844  }
Show more  




Change Warning 12273.30129 : Null Test After Dereference

Priority:
State:
Finding:
Owner:
Note: