summaryrefslogtreecommitdiff
path: root/app/xman
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-28 13:54:27 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-28 13:54:27 +0000
commit871e161ada35a29c3036a87725ad32567958d390 (patch)
tree8e182af607ff12f7d526bf1dfdc4508b242c2216 /app/xman
parent23698ca225d697ac1281449e75ac5c114863e96f (diff)
OpenBSD fixes
Diffstat (limited to 'app/xman')
-rw-r--r--app/xman/search.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/xman/search.c b/app/xman/search.c
index 48c4efe9a..362cfe47b 100644
--- a/app/xman/search.c
+++ b/app/xman/search.c
@@ -181,7 +181,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
if (type == APROPOS) {
char label[BUFSIZ];
- strcpy(tmp, MANTEMP); /* get a temp file. */
+ strlcpy(tmp, MANTEMP, sizeof(tmp)); /* get a temp file. */
#ifdef HAS_MKSTEMP
fd = mkstemp(tmp);
if (fd < 0) {
@@ -199,14 +199,14 @@ DoSearch(ManpageGlobals * man_globals, int type)
if (!ReadManConfig(path))
#endif
{
- strcpy(path,SYSMANPATH);
+ strlcpy(path,SYSMANPATH,sizeof(path));
#ifdef LOCALMANPATH
- strcat(path,":");
- strcat(path,LOCALMANPATH);
+ strlcat(path,":",sizeof(path));
+ strlcat(path,LOCALMANPATH,sizeof(path));
#endif
}
} else {
- strcpy(path,manpath);
+ strlcpy(path,manpath,sizeof(path));
}
snprintf(label, sizeof(label),
@@ -268,15 +268,15 @@ DoSearch(ManpageGlobals * man_globals, int type)
return(NULL);
}
- snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
- "%s", label);
+ snprintf(man_globals->manpage_title,sizeof(man_globals->manpage_title),
+ "%s", label);
ChangeLabel(man_globals->label,label);
fseek(file, 0L, SEEK_SET); /* reset file to point at top. */
}
else { /* MANUAL SEACH */
file = DoManualSearch(man_globals, search_string);
if (file == NULL) {
- snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.", search_string);
+ snprintf(string_buf,sizeof(string_buf),"No manual entry for %s.", search_string);
ChangeLabel(man_globals->label, string_buf);
if (man_globals->label == NULL)
PopupWarning(man_globals, string_buf);