diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2009-05-23 15:14:45 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2009-05-24 12:17:09 +0200 |
commit | 911aae05b5d3ffd2543333e27cf06778381c7b3c (patch) | |
tree | 33330b37bf5ede3156f1a7984f1692073223e454 /src/edit.c | |
parent | 04b38c4c173cef3b1b12163f1cf5a9b3cef8cb4a (diff) |
New upstream release 15.7a, fixing CVE-2009-014815.7a-1
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -42,7 +42,7 @@ #include <curses.h> #endif -static char const rcsid[] = "$Id: edit.c,v 1.6 2006/08/20 15:00:34 broeker Exp $"; +static char const rcsid[] = "$Id: edit.c,v 1.7 2009/04/10 13:39:23 broeker Exp $"; /* edit this displayed reference */ @@ -105,9 +105,9 @@ edit(char *file, char *linenum) char *s; file = filepath(file); - (void) sprintf(msg, "%s +%s %s", mybasename(editor), linenum, file); + (void) snprintf(msg, sizeof(msg), "%s +%s %s", mybasename(editor), linenum, file); postmsg(msg); - (void) sprintf(plusnum, lineflag, linenum); + (void) snprintf(plusnum, sizeof(plusnum), lineflag, linenum); /* if this is the more or page commands */ if (strcmp(s = mybasename(editor), "more") == 0 || strcmp(s, "page") == 0) { @@ -132,7 +132,7 @@ filepath(char *file) static char path[PATHLEN + 1]; if (prependpath != NULL && *file != '/') { - (void) sprintf(path, "%s/%s", prependpath, file); + (void) snprintf(path, sizeof(path), "%s/%s", prependpath, file); file = path; } return(file); |