mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 23:36:23 -05:00
Fix CID114556: Copy into fixed size buffer.
This commit is contained in:
parent
4feb70b484
commit
e5e2ca0636
4
buffer.c
4
buffer.c
@ -254,7 +254,9 @@ ask:
|
||||
bp = bp->b_bufp ; /* onward */
|
||||
}
|
||||
|
||||
strcpy( curbp->b_bname, bufn) ; /* copy buffer name to structure */
|
||||
/* copy buffer name to structure */
|
||||
strncpy( curbp->b_bname, bufn, sizeof( bname_t) - 1) ;
|
||||
curbp->b_bname[ sizeof( bname_t) - 1] = '\0' ;
|
||||
free( bufn) ;
|
||||
|
||||
curwp->w_flag |= WFMODE ; /* make mode line replot */
|
||||
|
Loading…
Reference in New Issue
Block a user