mirror of
https://github.com/simh/simh.git
synced 2026-01-25 11:46:37 +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 */
|
||||
if (ans != SCPE_OK)
|
||||
return ans;
|
||||
strncpy (port, cptr, CBUFSIZE-1);
|
||||
strncpy (port, cptr, sizeof(dmc_port[0]));
|
||||
uptr->filename = (char *)malloc (strlen(port)+1);
|
||||
strcpy (uptr->filename, port);
|
||||
uptr->flags |= UNIT_ATT;
|
||||
|
||||
Reference in New Issue
Block a user