diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-23 13:53:00 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-23 13:53:00 +0800 |
commit | 9d97ccd17f49a09600bbfcabe07ebb2d691a68ff (patch) | |
tree | 3e0f3c3650685d15ac3b76d0ccfaf8ee7b32731c /mbbsd/kaede.c | |
parent | 9ad97ad4b96e2a975f196d19cd43af34cd8beaca (diff) | |
download | pttbbs-9d97ccd17f49a09600bbfcabe07ebb2d691a68ff.tar pttbbs-9d97ccd17f49a09600bbfcabe07ebb2d691a68ff.tar.gz pttbbs-9d97ccd17f49a09600bbfcabe07ebb2d691a68ff.tar.bz2 pttbbs-9d97ccd17f49a09600bbfcabe07ebb2d691a68ff.tar.lz pttbbs-9d97ccd17f49a09600bbfcabe07ebb2d691a68ff.tar.xz pttbbs-9d97ccd17f49a09600bbfcabe07ebb2d691a68ff.tar.zst pttbbs-9d97ccd17f49a09600bbfcabe07ebb2d691a68ff.zip |
fix buffer overflow.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3075 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/kaede.c')
-rw-r--r-- | mbbsd/kaede.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c index f0f132a2..eef5bb03 100644 --- a/mbbsd/kaede.c +++ b/mbbsd/kaede.c @@ -11,6 +11,7 @@ Ptt_prints(char *str, int mode) strbuf[w++] = str[r]; else{ if( str[++r] != '*' ){ + if(w+2>=sizeof(strbuf)-1) break; strbuf[w++] = ESC_CHR; strbuf[w++] = str[r]; } |