(/home/sate/Testcases/c/cve/wireshark-1.2.0/proto_hier_stats.c) |
| |
| 139 | | | process_frame(frame_data *frame, column_info *cinfo, ph_stats_t* ps) |
| 140 | | | { |
| 141 | | | epan_dissect_t *edt; |
| 142 | | | union phdr; |
| 143 | | | guint8 pd[WTAP_MAX_PACKET_SIZE]; |
| 144 | | | int err; |
| 145 | | | gchar *err_info; |
| 146 | | | double cur_time; |
| 147 | | | |
| 148 | | | |
| 149 | | | if (!wtap_seek_read(cfile.wth, frame->file_off, &phdr, pd, |
| 150 | | | frame->cap_len, &err, &err_info)) { |
| 151 | | | simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, |
| 152 | | | cf_read_error_message(err, err_info), cfile.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. |
|
| 153 | | | return FALSE; |
| 154 | | | } |
| 155 | | | |
| 156 | | | |
| 157 | | | edt = epan_dissect_new(TRUE, FALSE); |
| 158 | | | epan_dissect_run(edt, &phdr, pd, frame, cinfo); |
| 159 | | | |
| 160 | | | |
| 161 | | | process_tree(edt->tree, ps, frame->pkt_len); |
| 162 | | | |
| 163 | | | |
| 164 | | | cur_time = nstime_to_sec(&frame->abs_ts); |
| 165 | | | if (cur_time < ps->first_time) { |
| 166 | | | ps->first_time = cur_time; |
| 167 | | | } |
| 168 | | | if (cur_time > ps->last_time){ |
| 169 | | | ps->last_time = cur_time; |
| 170 | | | } |
| 171 | | | |
| 172 | | | |
| 173 | | | epan_dissect_free(edt); |
| 174 | | | |
| 175 | | | return TRUE; |
| 176 | | | } |
| |