From d71ed03ba1dbb4db6d14df9755e4942df95d03b2 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Sat, 21 Apr 2012 18:13:10 +0000 Subject: [PATCH] fixed buffer overflow in serial.cc --- bochs/CHANGES | 1 + bochs/iodev/serial.cc | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bochs/CHANGES b/bochs/CHANGES index 35b1e5a15..fd68c37e2 100644 --- a/bochs/CHANGES +++ b/bochs/CHANGES @@ -68,6 +68,7 @@ Changes after 2.5.1 release: [3486555] Fix critical stack leak in Win32 GUI by Carlo Bramini - these S.F. bugs were closed/fixed + [3518753] update dump after manual chages to memory contents [3516859] bug in svn e1000 module [3516029] stepping not working in debugger GUI in case of smp vm [3510403] closing config dialog box closes entire simulator diff --git a/bochs/iodev/serial.cc b/bochs/iodev/serial.cc index 4a04aea10..262a06f19 100644 --- a/bochs/iodev/serial.cc +++ b/bochs/iodev/serial.cc @@ -73,7 +73,7 @@ void serial_init_options(void) NULL }; - char name[4], label[80], descr[80]; + char name[4], label[80], descr[120]; bx_list_c *serial = (bx_list_c*)SIM->get_param("ports.serial"); for (int i=0; iset_ask_format("Choose I/O mode of the serial device [%s] "); sprintf(label, "Pathname of the serial device for COM%d", i+1); - sprintf(descr, "The path can be a real serial device or a pty (X/Unix only)"); - bx_param_filename_c *path = new bx_param_filename_c(menu, "dev", label, descr, + bx_param_filename_c *path = new bx_param_filename_c(menu, "dev", label, + "The path can be a real serial device or a pty (X/Unix only)", "", BX_PATHNAME_LEN); bx_list_c *deplist = new bx_list_c(NULL); deplist->add(mode);