summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/edit.c b/src/edit.c
index 5d97949..0f4edec 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -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);