(/home/sate/Testcases/c/cve/wireshark-1.2.0/file.c) |
| |
| 3329 | | | cf_select_packet(capture_file *cf, int row) |
| 3330 | | | { |
| 3331 | | | frame_data *fdata; |
| 3332 | | | int err; |
| 3333 | | | gchar *err_info; |
| 3334 | | | |
| 3335 | | | |
| 3336 | | | fdata = (frame_data *)packet_list_get_row_data(row); |
| 3337 | | | |
| 3338 | | | if (fdata == NULL) { |
| 3339 | | | |
| 3340 | | | |
| 3341 | | | |
| 3342 | | | |
| 3343 | | | |
| 3344 | | | |
| 3345 | | | |
| 3346 | | | |
| 3347 | | | |
| 3348 | | | |
| 3349 | | | |
| 3350 | | | |
| 3351 | | | |
| 3352 | | | |
| 3353 | | | |
| 3354 | | | |
| 3355 | | | |
| 3356 | | | |
| 3357 | | | |
| 3358 | | | |
| 3359 | | | |
| 3360 | | | |
| 3361 | | | |
| 3362 | | | |
| 3363 | | | |
| 3364 | | | |
| 3365 | | | if (row == 0 && cf->first_displayed == cf->last_displayed) |
| 3366 | | | fdata = cf->first_displayed; |
| 3367 | | | } |
| 3368 | | | |
| 3369 | | | |
| 3370 | | | if (fdata == NULL) { |
| 3371 | | | return; |
| 3372 | | | } |
| 3373 | | | |
| 3374 | | | |
| 3375 | | | if (!wtap_seek_read (cf->wth, fdata->file_off, &cf->, |
| 3376 | | | cf->pd, fdata->cap_len, &err, &err_info)) { |
| 3377 | | | simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, |
| 3378 | | | cf_read_error_message(err, err_info), cf->filename); |
Format String
simple_dialog() is being called with a format string that is not constant. The format string (third argument) may not match the other arguments to simple_dialog(); this could lead to security or stability problems. simple_dialog() is usually called with strings that look like format strings in this project. |
|
| 3379 | | | return; |
| 3380 | | | } |
| 3381 | | | |
| 3382 | | | |
| 3383 | | | cf->current_frame = fdata; |
| 3384 | | | cf->current_row = row; |
| 3385 | | | |
| 3386 | | | |
| 3387 | | | if (cf->edt != NULL) { |
| 3388 | | | epan_dissect_free(cf->edt); |
| 3389 | | | cf->edt = NULL; |
| 3390 | | | } |
| 3391 | | | |
| 3392 | | | cf->edt = epan_dissect_new(TRUE, TRUE); |
| 3393 | | | |
| 3394 | | | epan_dissect_run(cf->edt, &cf->, cf->pd, cf->current_frame, |
| 3395 | | | NULL); |
| 3396 | | | |
| 3397 | | | dfilter_macro_build_ftv_cache(cf->edt->tree); |
| 3398 | | | |
| 3399 | | | cf_callback_invoke(cf_cb_packet_selected, cf); |
| 3400 | | | } |
| |