SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
23
editors/cooledit/patches/patch-editor_shell_c
Normal file
23
editors/cooledit/patches/patch-editor_shell_c
Normal file
|
@ -0,0 +1,23 @@
|
|||
Do not use printf(3) %n.
|
||||
|
||||
Index: editor/shell.c
|
||||
--- editor/shell.c.orig
|
||||
+++ editor/shell.c
|
||||
@@ -928,7 +928,7 @@ static void save_scripts (void)
|
||||
for (r = t; *r; r++)
|
||||
if (*r == '\n')
|
||||
*r = 129; /* replace newlines with 129 */
|
||||
- sprintf (p, "%s\n%s\n%c\n%d\n%d\n%s\n%d\n%s\n%s\n%n",
|
||||
+ n = sprintf (p, "%s\n%s\n%c\n%d\n%d\n%s\n%d\n%s\n%s\n",
|
||||
scripts[i]->name ? scripts[i]->name : 0,
|
||||
scripts[i]->menu ? scripts[i]->menu : 0,
|
||||
scripts[i]->menu_hot_key ? scripts[i]->menu_hot_key : ' ',
|
||||
@@ -937,7 +937,7 @@ static void save_scripts (void)
|
||||
scripts[i]->prompt ? scripts[i]->prompt : "",
|
||||
(int) scripts[i]->options,
|
||||
scripts[i]->last_options ? scripts[i]->last_options : "",
|
||||
- t, &n);
|
||||
+ t);
|
||||
free (t);
|
||||
p += n;
|
||||
i++;
|
Loading…
Add table
Add a link
Reference in a new issue