comparison src/screen.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 c0256c4bd91e
children cd59ba19985a
comparison
equal deleted inserted replaced
3838:949bd4cef950 3839:8115f449a574
9874 void 9874 void
9875 get_trans_bufname(buf) 9875 get_trans_bufname(buf)
9876 buf_T *buf; 9876 buf_T *buf;
9877 { 9877 {
9878 if (buf_spname(buf) != NULL) 9878 if (buf_spname(buf) != NULL)
9879 STRCPY(NameBuff, buf_spname(buf)); 9879 vim_strncpy(NameBuff, buf_spname(buf), MAXPATHL - 1);
9880 else 9880 else
9881 home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE); 9881 home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE);
9882 trans_characters(NameBuff, MAXPATHL); 9882 trans_characters(NameBuff, MAXPATHL);
9883 } 9883 }
9884 #endif 9884 #endif