PDP11, PDP10, Unibus VAX: Fix potential buffer overflow warning
This commit is contained in:
parent
89d51032e2
commit
6041cd627b
1 changed files with 3 additions and 2 deletions
|
@ -419,8 +419,9 @@ t_stat ch_attach (UNIT *uptr, CONST char *cptr)
|
|||
if (peer[0] == '\0')
|
||||
return sim_messagef (SCPE_2FARG, "Must set Chaosnet PEER \"SET CH PEER=host:port\"\n");
|
||||
|
||||
sprintf (linkinfo, "Buffer=%d,Line=%d,UDP,%s,PACKET,Connect=%s",
|
||||
(int)sizeof tx_buffer, 0, cptr, peer);
|
||||
linkinfo[sizeof (linkinfo) - 1] = '\0';
|
||||
snprintf (linkinfo, sizeof (linkinfo) - 1, "Buffer=%d,Line=%d,UDP,%s,PACKET,Connect=%s",
|
||||
(int)sizeof (tx_buffer), 0, cptr, peer);
|
||||
r = tmxr_attach (&ch_tmxr, uptr, linkinfo);
|
||||
if (r != SCPE_OK) {
|
||||
sim_debug (DBG_ERR, &ch_dev, "TMXR error opening master\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue