Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at ascend.c:311

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

ascend_read

(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/ascend.c)expand/collapse
Show more  
 264  static gboolean ascend_read(wtap *wth, int *err, gchar **err_info,
 265          gint64 *data_offset)
 266  {
 267    gint64 offset;
 268    guint8 *buf = buffer_start_ptr(wth->frame_buffer);
 269    ascend_pkthdr header;
 270   
 271    /* parse_ascend() will advance the point at which to look for the next 
 272       packet's header, to just after the last packet's header (ie. at the
 273       start of the last packet's data). We have to get past the last 
 274       packet's header because we might mistake part of it for a new header. */
 275    if (file_seek(wth->fh, wth->capture.ascend->next_packet_seek_start,
 276[+]                 SEEK_SET, err) == -1)
 277      return FALSE;
 278   
 279[+]     offset = ascend_seek(wth, err);
 280      if (offset == -1)
 281        return FALSE;
 282[+]   if (! parse_ascend(wth->fh, buf, &wth->pseudo_header.ascend, &header, &(wth->capture.ascend->next_packet_seek_start))) {
 283      *err = WTAP_ERR_BAD_RECORD;
 284      *err_info = g_strdup((ascend_parse_error != NULL) ? ascend_parse_error : "parse error");
 285      return FALSE;
 286    }
 287   
 288    buffer_assure_space(wth->frame_buffer, wth->snapshot_length);
 289   
 290    config_pseudo_header(&wth->pseudo_header);
 291   
 292    if (! wth->capture.ascend->adjusted) {
 293      wth->capture.ascend->adjusted = 1;
 294      if (header.start_time != 0) {
 295        /*
 296         * Capture file contained a date and time.
 297         * We do this only if this is the very first packet we've seen -
 298         * i.e., if "wth->capture.ascend->adjusted" is false - because 
 299         * if we get a date and time after the first packet, we can't
 300         * go back and adjust the time stamps of the packets we've already 
 301         * processed, and basing the time stamps of this and following 
 302         * packets on the time stamp from the file text rather than the
 303         * ctime of the capture file means times before this and after 
 304         * this can't be compared.
 305         */
 306        wth->capture.ascend->inittime = header.start_time;
 307      }
 308      if (wth->capture.ascend->inittime > header.secs)
 309        wth->capture.ascend->inittime -= header.secs;
 310    }
 311    wth->phdr.ts.secs = header.secs + wth->capture.ascend->inittime;
Show more  




Change Warning 963.30814 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: