diff options
author | Warner Losh <imp@FreeBSD.org> | 1998-01-21 21:46:36 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 1998-01-21 21:46:36 +0000 |
commit | 9f6c32362c3a88145171bf9a3d9deec57b76167e (patch) | |
tree | 8f6160c42c6a7b915560d7691b15ed994e7b88f7 /lib/libc/gen/timezone.c | |
parent | 462232c223e294eab5166ed5a2e8bf65b80e295b (diff) | |
download | src-9f6c32362c3a88145171bf9a3d9deec57b76167e.tar.gz src-9f6c32362c3a88145171bf9a3d9deec57b76167e.zip |
Eliminate sprintf
Obtained from:OpenBSD (theo de raadt)
Notes
Notes:
svn path=/head/; revision=32687
Diffstat (limited to 'lib/libc/gen/timezone.c')
-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 fe3ce23dfb44..74086ef463e1 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); } |