Revision 95ce326e

b/monitor.c
1437 1437
static void term_print_cmdline (const char *cmdline)
1438 1438
{
1439 1439
    term_show_prompt();
1440
    term_printf(cmdline);
1440
    term_printf("%s", cmdline);
1441 1441
    term_flush();
1442 1442
}
1443 1443

  
......
1521 1521
    }
1522 1522
    term_hist_entry--;
1523 1523
    if (term_hist_entry >= 0) {
1524
	strcpy(term_cmd_buf, term_history[term_hist_entry]);
1524
	pstrcpy(term_cmd_buf, sizeof(term_cmd_buf), 
1525
                term_history[term_hist_entry]);
1525 1526
	term_printf("\n");
1526 1527
	term_print_cmdline(term_cmd_buf);
1527 1528
	term_cmd_buf_index = term_cmd_buf_size = strlen(term_cmd_buf);
......
1533 1534
    if (term_hist_entry == TERM_MAX_CMDS - 1 || term_hist_entry == -1)
1534 1535
	return;
1535 1536
    if (term_history[++term_hist_entry] != NULL) {
1536
	strcpy(term_cmd_buf, term_history[term_hist_entry]);
1537
	pstrcpy(term_cmd_buf, sizeof(term_cmd_buf),
1538
                term_history[term_hist_entry]);
1537 1539
    } else {
1538 1540
	term_hist_entry = -1;
1539 1541
    }

Also available in: Unified diff