diff options
author | lantw44 <lantw44.bbs@sony.tfcis.org> | 2017-09-14 23:38:37 +0800 |
---|---|---|
committer | BBS Administrator <bbs@sony.tfcis.org> | 2017-09-14 23:39:52 +0800 |
commit | 94bb24249c2a3f6e68955b6b8339c337b43bdb81 (patch) | |
tree | 2d8b129b70683672d8e0294c86c38eed219fba50 | |
parent | ff109ce40229506acb4c5b60f1060288553a63b4 (diff) | |
download | sonybbs-94bb24249c2a3f6e68955b6b8339c337b43bdb81.tar.gz sonybbs-94bb24249c2a3f6e68955b6b8339c337b43bdb81.tar.zst sonybbs-94bb24249c2a3f6e68955b6b8339c337b43bdb81.zip |
減少在顯示故鄉時可能發生陣列存取越界的機會
我知道這樣並不能解決問題,但這是暫時避免問題最快的方法。
-rw-r--r-- | include/global.h | 3 | ||||
-rw-r--r-- | maple/bbsd.c | 2 | ||||
-rw-r--r-- | maple/edit.c | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/include/global.h b/include/global.h index c1b4431..d0fc1aa 100644 --- a/include/global.h +++ b/include/global.h @@ -433,7 +433,8 @@ VAR int b_lines; /* bottom line */ VAR int b_cols; /* bottom columns */ VAR int d_cols; /* difference columns from standard */ -VAR char fromhost[48]; /* from FQDN */ +/* FIXME: lantw44: ȮקKDkAoOѨMkI*/ +VAR char fromhost[256]; /* from FQDN */ VAR char ve_title[80]; /* edited title */ VAR char quote_file[80]; diff --git a/maple/bbsd.c b/maple/bbsd.c index 986ea4b..2832b69 100644 --- a/maple/bbsd.c +++ b/maple/bbsd.c @@ -577,7 +577,7 @@ utmp_setup(mode) * pG 140.112. gJ etc/host ANΧ ntu.edu.tw * * мgJ etc/fqdn ̤F */ - char name[48]; + char name[256]; /* ID */ str_lower(name, cuser.userid); diff --git a/maple/edit.c b/maple/edit.c index 0268123..bf74a19 100644 --- a/maple/edit.c +++ b/maple/edit.c @@ -1502,7 +1502,8 @@ ve_banner(fp, modify) /* [WӷT */ int modify; /* 1:ק 0: */ { /* chitsaou: IP \ */ - char name[40], fqdn[40], ipaddr[40]; + /* FIXME: lantw44: ڭ̻ݭnˬdڡI*/ + char name[256], fqdn[256], ipaddr[256]; unsigned long sum; unsigned long base[4]={16777216,65536,256,1}; int i, ip[4]; |