diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2008-05-18 13:53:32 +0200 |
---|---|---|
committer | Matthieu Herrb <matthieu@bluenote.herrb.net> | 2008-06-19 16:42:10 +0200 |
commit | 219dd2d44a9da40427ad48b0f09b981fe0551f4b (patch) | |
tree | d1deebe491b44e09516ffb48859883fc3ae504f7 /os/access.c | |
parent | cfcb3da75e807dec225cc7ea469e04d2db10bf73 (diff) |
sprintf() -> snprintf()
Diffstat (limited to 'os/access.c')
-rw-r--r-- | os/access.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/os/access.c b/os/access.c index db14380df..6b55afd84 100644 --- a/os/access.c +++ b/os/access.c @@ -1190,7 +1190,8 @@ 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); if ((fd = fopen (fname, "r")) != 0) { |