fixed buffer overflow warning

This commit is contained in:
Stanislav Shwartsman 2019-11-23 15:15:50 +00:00
parent 7833a82347
commit 9a1c3a9313

View File

@ -1219,7 +1219,8 @@ static int bx_restore_getline(FILE *fp, char *line, int maxlen)
bx_bool bx_real_sim_c::restore_bochs_param(bx_list_c *root, const char *sr_path, const char *restore_name)
{
char devstate[BX_PATHNAME_LEN], devdata[BX_PATHNAME_LEN];
char line[512], buf[512], pname[80];
char line[512], buf[512];
char pname[81]; // take extra 81st character for /0
char *ptr;
int i;
unsigned n;