diff options
author | imp <imp@FreeBSD.org> | 1998-01-21 21:46:36 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1998-01-21 21:46:36 +0000 |
commit | ccb92f47cfc86be9626308ebee74f4247c98ef14 (patch) | |
tree | 2d3eec4b63904c3b82deec96c6cce2be8ff5653b /lib/libc | |
parent | 0753479b42c8155c9ad7579a994d17ca5ff74f27 (diff) | |
download | FreeBSD-src-ccb92f47cfc86be9626308ebee74f4247c98ef14.zip FreeBSD-src-ccb92f47cfc86be9626308ebee74f4247c98ef14.tar.gz |
Eliminate sprintf
Obtained from:OpenBSD (theo de raadt)
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/timezone.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c index fe3ce23..74086ef 100644 --- a/lib/libc/gen/timezone.c +++ b/lib/libc/gen/timezone.c @@ -129,6 +129,7 @@ _tztab(zone,dst) } else sign = '-'; - (void)sprintf(czone,"GMT%c%d:%02d",sign,zone / 60,zone % 60); + (void)snprintf(czone, sizeof(czone), + "GMT%c%d:%02d",sign,zone / 60,zone % 60); return(czone); } |