mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
vim-patch:9.0.0733: use of strftime() is not safe (#21228)
Problem: Use of strftime() is not safe.
Solution: Check the return value of strftime(). Use a larger buffer and
correctly pass the available space. (Dominique Pellé, closes
vim/vim#11348)
84d14ccdb5
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
This commit is contained in:
@@ -1461,7 +1461,7 @@ static time_t swapfile_info(char_u *fname)
|
||||
msg_puts(_(" dated: "));
|
||||
#endif
|
||||
x = file_info.stat.st_mtim.tv_sec;
|
||||
char ctime_buf[50];
|
||||
char ctime_buf[100]; // hopefully enough for every language
|
||||
msg_puts(os_ctime_r(&x, ctime_buf, sizeof(ctime_buf)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user