PDP10, PDP11, VAX: Fix buffer overrun in dmc_attach
This commit is contained in:
parent
6501503897
commit
b4e604aae4
1 changed files with 1 additions and 1 deletions
|
@ -3823,7 +3823,7 @@ sprintf (attach_string, "Line=%d,Connect=%s,%s", dmc, peer, cptr);
|
||||||
ans = tmxr_open_master (mp, attach_string); /* open master socket */
|
ans = tmxr_open_master (mp, attach_string); /* open master socket */
|
||||||
if (ans != SCPE_OK)
|
if (ans != SCPE_OK)
|
||||||
return ans;
|
return ans;
|
||||||
strncpy (port, cptr, CBUFSIZE-1);
|
strncpy (port, cptr, sizeof(dmc_port[0]));
|
||||||
uptr->filename = (char *)malloc (strlen(port)+1);
|
uptr->filename = (char *)malloc (strlen(port)+1);
|
||||||
strcpy (uptr->filename, port);
|
strcpy (uptr->filename, port);
|
||||||
uptr->flags |= UNIT_ATT;
|
uptr->flags |= UNIT_ATT;
|
||||||
|
|
Loading…
Add table
Reference in a new issue