(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/ascend.c) |
| |
| 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);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/buffer.h |
| |
46 | # define buffer_start_ptr(buffer) ((buffer)->data + (buffer)->start) |
| |
|
| 269 | | | ascend_pkthdr ; |
| 270 | | | |
| 271 | | | |
| 272 | | | |
| 273 | | | |
| 274 | | | |
| 275 | | | if (file_seek(wth->fh, wth->capture.ascend->next_packet_seek_start, |
| 276 | [+] | | SEEK_SET, err) == -1)
x /usr/include/stdio.h |
| |
141 | #define SEEK_SET 0 /* Seek from beginning of file. */ |
| |
|
 |
| 277 | | | return FALSE; |
| 278 | | | |
| 279 | [+] | | offset = ascend_seek(wth, err); |
 |
| 280 | | | if (offset == -1) |
Event 14:
Skipping " if". offset == -1 evaluates to false.
hide
|
|
| 281 | | | return FALSE; |
| 282 | [+] | | if (! parse_ascend(wth->fh, buf, &wth->.ascend, &, &(wth->capture.ascend->next_packet_seek_start))) { |
Event 15:
parse_ascend() does not initialize . - This may be because of a failure case or other special case for parse_ascend().
hide
|
|
 |
| 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 | | | (&wth->); |
| 291 | | | |
| 292 | | | if (! wth->capture.ascend->adjusted) { |
Event 20:
Skipping " if". wth->capture.ascend->adjusted evaluates to true.
hide
|
|
| 293 | | | wth->capture.ascend->adjusted = 1; |
| 294 | | | if (.start_time != 0) { |
| 295 | | | |
| 296 | | | |
| 297 | | | |
| 298 | | | |
| 299 | | | |
| 300 | | | |
| 301 | | | |
| 302 | | | |
| 303 | | | |
| 304 | | | |
| 305 | | | |
| 306 | | | wth->capture.ascend->inittime = .start_time; |
| 307 | | | } |
| 308 | | | if (wth->capture.ascend->inittime > .secs) |
| 309 | | | wth->capture.ascend->inittime -= .secs; |
| 310 | | | } |
| 311 | | | wth->phdr.ts.secs = .secs + wth->capture.ascend->inittime; |
Uninitialized Variable
was not initialized. The issue can occur if the highlighted code executes. See related event 15. Show: All events | Only primary events |
|
| |