mirror of
https://github.com/rfivet/uemacs.git
synced 2025-09-26 23:14:02 -04:00
Fix CID114556: Copy into fixed size buffer.
This commit is contained in:
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 */
|
||||||
|
Reference in New Issue
Block a user