Mercurial > vim
diff src/ex_docmd.c @ 3839:8115f449a574 v7.3.677
updated for version 7.3.677
Problem: buf_spname() is used inconsistently.
Solution: Make the return type a char_u pointer. Check the size of the
returned string.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 03 Oct 2012 18:25:00 +0200 |
parents | 2a200527131f |
children | 1773d5aa6437 |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -7602,7 +7602,7 @@ ex_tabs(eap) msg_putchar(bufIsChanged(wp->w_buffer) ? '+' : ' '); msg_putchar(' '); if (buf_spname(wp->w_buffer) != NULL) - STRCPY(IObuff, buf_spname(wp->w_buffer)); + vim_strncpy(IObuff, buf_spname(wp->w_buffer), IOSIZE - 1); else home_replace(wp->w_buffer, wp->w_buffer->b_fname, IObuff, IOSIZE, TRUE);