diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-03-23 01:57:26 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-03-23 01:57:26 +0800 |
commit | f3345cd954974f80862940ec628f17942a288316 (patch) | |
tree | 2a128eaf2a8808e479f898885094a32498bf7a2b /mbbsd/osdep.c | |
parent | 35e59bbab441a93c6079b1a64006e07b4f9b977c (diff) | |
download | pttbbs-f3345cd954974f80862940ec628f17942a288316.tar pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.gz pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.bz2 pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.lz pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.xz pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.zst pttbbs-f3345cd954974f80862940ec628f17942a288316.zip |
fix bugs introduced because replace sprintf and strncpy with snprintf and strlcpy without careful checks.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3292 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/osdep.c')
-rw-r--r-- | mbbsd/osdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/osdep.c b/mbbsd/osdep.c index 4872083e..f4a9bd85 100644 --- a/mbbsd/osdep.c +++ b/mbbsd/osdep.c @@ -613,7 +613,7 @@ cpuload(char *str) } if (str) { if (l[0] != -1) - snprintf(str, sizeof(str), " %.2f %.2f %.2f", l[0], l[1], l[2]); + sprintf(str, " %.2f %.2f %.2f", l[0], l[1], l[2]); else strcpy(str, " (unknown) "); } |