Skip to content

Commit

Permalink
Fix memory overflow when reading save filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaian committed Oct 16, 2014
1 parent 8bddee3 commit cefe909
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui_save_pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ save_draw(PANEL *panel)
save_info_t *info = (save_info_t*) panel_userptr(panel);
WINDOW *win = panel_window(panel);

mvwprintw(win, 5, 3, "( ) Save all packets");
mvwprintw(win, 6, 3, "( ) Save selected packets (%d packets)", call_group_msg_count(info->group));
mvwprintw(win, 5, 3, "( ) Save all messages");
mvwprintw(win, 6, 3, "( ) Save selected messages (%d messages)", call_group_msg_count(info->group));

set_field_buffer(info->fields[FLD_SAVE_ALL], 0, is_option_enabled("sngrep.saveselected")?"":"*");
set_field_buffer(info->fields[FLD_SAVE_SELECTED], 0, is_option_enabled("sngrep.saveselected")?"*":"");
Expand Down Expand Up @@ -261,7 +261,7 @@ save_error_message(PANEL *panel, const char *message)
int
save_to_file(PANEL *panel)
{
char field_value[48];
char field_value[256];
sip_call_t *call = NULL;
sip_msg_t *msg = NULL;
int i;
Expand Down

0 comments on commit cefe909

Please sign in to comment.