Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at text2pcap.c:719

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

parse_token

(/home/sate/Testcases/c/cve/wireshark-1.2.0/text2pcap.c)expand/collapse
Show more  
 872  parse_token (token_t token, char *str)
 873  {
 874      unsigned long num;
 875   
 876      /*
 877       * This is implemented as a simple state machine of five states.
 878       * State transitions are caused by tokens being received from the
 879       * scanner. The code should be self_documenting.
 880       */
 881   
 882      if (debug>=2) {
 883          /* Sanitize - remove all '\r' */
 884          char *c;
 885          if (str!=NULL) { while ((c = strchr(str, '\r')) != NULL) *c=' '; }
 886   
 887          fprintf(stderr, "(%s, %s \"%s\") -> (",
 888                  state_str[state], token_str[token], str ? str : "");
 889      }
 890   
 891      switch(state) {
 892   
 893      /* ----- Waiting for new packet -------------------------------------------*/
 894      case INIT:
 895          switch(token) {
 896          case T_TEXT:
 897[+]             append_to_preamble(str);
expand/collapse

append_to_preamble

(/home/sate/Testcases/c/cve/wireshark-1.2.0/text2pcap.c)expand/collapse
Show more  
 709  append_to_preamble(char *str)
 710  {
 711      size_t toklen;
 712   
 713      if (packet_preamble_len != 0) {
 714          if (packet_preamble_len == PACKET_PREAMBLE_MAX_LEN)
 715              return;     /* no room to add more preamble */
 716          /* Add a blank separator between the previous token and this token. */
 717          packet_preamble[packet_preamble_len++] = ' ';
 718      }
 719      toklen = strlen(str);
Show more  
Show more  




Change Warning 4903.30301 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: