Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at dct3trace.c:253

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

dct3trace_get_packet

(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/dct3trace.c)expand/collapse
Show more  
 210  static gboolean dct3trace_get_packet(FILE *fh, union wtap_pseudo_header *pseudo_header,
 211          unsigned char *buf, int *len, int *err, gchar **err_info)
 212  {
 213          unsigned char line[1024];
 214          gboolean have_data = FALSE;
 215   
 216          while (file_gets(line, sizeof(line), fh) != NULL)
 217          {
 218                  if( memcmp(dct3trace_magic_end, line, strlen(dct3trace_magic_end)) == 0 )
 219                  {
 220                          /* Return on end of file </dump> */
 221                          *err = 0;
 222                          return FALSE;
 223                  }
 224                  else if( memcmp(dct3trace_magic_record_end, line, strlen(dct3trace_magic_record_end)) == 0 )
 225                  {
 226                          /* Return on end of record </l1> */
 227                          if( have_data )
 228                          {
 229                                  *err = 0;
 230                                  return TRUE;
 231                          }
 232                          else 
 233                          {
 234                                  /* If not got any data return error */
 235                                  *err = WTAP_ERR_BAD_RECORD;
 236                                  *err_info = g_strdup_printf("dct3trace: record without data");
 237                                  return FALSE;
 238                          }
 239                  }
 240                  else if( memcmp(dct3trace_magic_record_start, line, strlen(dct3trace_magic_record_start)) == 0 )
 241                  {
 242                          /* Parse L1 header <l1 ...>*/
 243                          int channel, tmp, ret = 0;
 244                          char *ptr;
 245   
 246                          pseudo_header->gsm_um.uplink = !strstr(line, "direction=\"down\"");
 247                          ret |= xml_get_int(&channel, line, "logicalchannel");
 248   
 249                          /* Parse downlink only fields */
 250                          if( !pseudo_header->gsm_um.uplink )
 251                          {
 252[+]                                 ret |= xml_get_int(&tmp, line, "physicalchannel");
 253                                  pseudo_header->gsm_um.arfcn = tmp;
Show more  




Change Warning 993.30022 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: