summaryrefslogtreecommitdiff
path: root/app/xman/buttons.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-08-28 13:15:53 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-08-28 13:15:53 +0000
commit71eb4812b00dd0d98a05887a21df58717941fc76 (patch)
tree43f697e092a3a5b599869d91f40976ca3e3526b0 /app/xman/buttons.c
parente03da26e2f5829d91468bd99745bf24139cd3e2b (diff)
Update to xman 1.1.2
Diffstat (limited to 'app/xman/buttons.c')
-rw-r--r--app/xman/buttons.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/xman/buttons.c b/app/xman/buttons.c
index ee251d34d..9233346ef 100644
--- a/app/xman/buttons.c
+++ b/app/xman/buttons.c
@@ -522,7 +522,7 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
for (i = 0 ; i < sections ; i ++) {
num_args = 0;
XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
- sprintf(entry_name, "section%d", i);
+ snprintf(entry_name, sizeof(entry_name), "section%d", i);
entry = XtCreateManagedWidget(entry_name, smeBSBObjectClass,
menu, args, num_args);
@@ -579,7 +579,7 @@ MakeDirectoryBox(ManpageGlobals *man_globals, Widget parent, Widget *dir_disp, i
return;
name = manual[section].blabel; /* Set the section name */
- sprintf(label_name,"Directory of: %s",name);
+ snprintf(label_name, sizeof(label_name), "Directory of: %s", name);
man_globals->section_name[section] = StrAlloc(label_name);
num_args = 0;
@@ -745,7 +745,8 @@ ConvertNamesToWidgets(Widget parent, char ** names)
if (*temp_ids == NULL) {
char error_buf[BUFSIZ];
- sprintf(error_buf, "Could not find widget named '%s'", *names);
+ snprintf(error_buf, sizeof(error_buf),
+ "Could not find widget named '%s'", *names);
PrintError(error_buf);
XtFree((char *)ids);
return(NULL);