Mercurial > vim
comparison src/os_unix.c @ 2768:c5e47b752f07 v7.3.160
updated for version 7.3.160
Problem: Unsafe string copying.
Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead
of strcat().
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 11 Apr 2011 16:56:35 +0200 |
parents | cd3f52531f6c |
children | bf283e37792b |
comparison
equal
deleted
inserted
replaced
2767:9d6d058f0ebb | 2768:c5e47b752f07 |
---|---|
5723 */ | 5723 */ |
5724 check_spaces = FALSE; | 5724 check_spaces = FALSE; |
5725 if (shell_style == STYLE_PRINT && !did_find_nul) | 5725 if (shell_style == STYLE_PRINT && !did_find_nul) |
5726 { | 5726 { |
5727 /* If there is a NUL, set did_find_nul, else set check_spaces */ | 5727 /* If there is a NUL, set did_find_nul, else set check_spaces */ |
5728 buffer[len] = NUL; | |
5728 if (len && (int)STRLEN(buffer) < (int)len - 1) | 5729 if (len && (int)STRLEN(buffer) < (int)len - 1) |
5729 did_find_nul = TRUE; | 5730 did_find_nul = TRUE; |
5730 else | 5731 else |
5731 check_spaces = TRUE; | 5732 check_spaces = TRUE; |
5732 } | 5733 } |
6592 - (xterm_hints.width_inc / 2); | 6593 - (xterm_hints.width_inc / 2); |
6593 if (xterm_hints.x <= xterm_hints.width_inc / 2) | 6594 if (xterm_hints.x <= xterm_hints.width_inc / 2) |
6594 xterm_hints.x = 2; | 6595 xterm_hints.x = 2; |
6595 return TRUE; | 6596 return TRUE; |
6596 } | 6597 } |
6597 if (mouse_code == NULL) | 6598 if (mouse_code == NULL || STRLEN(mouse_code) > 45) |
6598 { | 6599 { |
6599 xterm_trace = 0; | 6600 xterm_trace = 0; |
6600 return FALSE; | 6601 return FALSE; |
6601 } | 6602 } |
6602 | 6603 |