mirror of
https://github.com/open-simh/simh.git
synced 2026-04-27 20:48:20 +00:00
PDP10, PDP11, VAX: Fix buffer overrun in dmc_attach
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user