diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-28 20:29:33 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-28 20:29:33 +0000 |
commit | 70ce0341935fd116216e76d40ef65d969227e892 (patch) | |
tree | 6c3f151e6258cb75b0b1983e1e563d2b95ec457d /xserver/os/access.c | |
parent | df6b77dc03dec3df43fadeb2f3a4912966e93ea1 (diff) |
OpenBSD local modifications:
- privilege separation
- some snprintf/strlc{at,py} conversions
- support for more architectures
- signal handler fixes
- default mouse wheel support in config tools
- sunmouse protocol
Diffstat (limited to 'xserver/os/access.c')
-rw-r--r-- | xserver/os/access.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xserver/os/access.c b/xserver/os/access.c index cdb17589c..468ff2f64 100644 --- a/xserver/os/access.c +++ b/xserver/os/access.c @@ -1198,9 +1198,10 @@ ResetHosts (char *display) strlen(display) + 1; if (fnamelen > sizeof(fname)) FatalError("Display name `%s' is too long\n", display); - sprintf(fname, ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX, display); + snprintf(fname, sizeof(fname), ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX, + display); #ifdef __UNIXOS2__ - strcpy(fname, (char*)__XOS2RedirRoot(fname)); + strlcpy(fname, (char*)__XOS2RedirRoot(fname), sizeof(fname)); #endif /* __UNIXOS2__ */ if ((fd = fopen (fname, "r")) != 0) |