mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-29 20:46:22 -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 */
|
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) ;
|
free( bufn) ;
|
||||||
|
|
||||||
curwp->w_flag |= WFMODE ; /* make mode line replot */
|
curwp->w_flag |= WFMODE ; /* make mode line replot */
|
||||||
|
Loading…
Reference in New Issue
Block a user