diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-06-10 19:13:48 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-06-10 19:13:48 +0800 |
commit | 1b3c384f4438e862d1b36d3dc9f202be641f1b7f (patch) | |
tree | 51ca99de4431cfe8dfd19ad6b34e8114b7fbe25f | |
parent | 7a682002408149db360ca5e19ed08034464e0087 (diff) | |
download | pttbbs-1b3c384f4438e862d1b36d3dc9f202be641f1b7f.tar pttbbs-1b3c384f4438e862d1b36d3dc9f202be641f1b7f.tar.gz pttbbs-1b3c384f4438e862d1b36d3dc9f202be641f1b7f.tar.bz2 pttbbs-1b3c384f4438e862d1b36d3dc9f202be641f1b7f.tar.lz pttbbs-1b3c384f4438e862d1b36d3dc9f202be641f1b7f.tar.xz pttbbs-1b3c384f4438e862d1b36d3dc9f202be641f1b7f.tar.zst pttbbs-1b3c384f4438e862d1b36d3dc9f202be641f1b7f.zip |
security fix in blog
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2058 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/announce.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c index 844a6f72..3d1e3d9d 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -1128,7 +1128,7 @@ void BlogMain(int num) system(genbuf); break; case '4':{ - char hash[35]; + char hash[33]; int i; getdata(16, 0, "請輸入該篇的雜湊值: ", hash, sizeof(hash), DOECHO); @@ -1170,8 +1170,16 @@ void BlogMain(int num) case '5': { char date[9]; + int i; getdata(16, 0, "請輸入該篇的日期(yyyymmdd): ", date, sizeof(date), DOECHO); + for( i = 0 ; i < 9 ; ++i ) + if( !isdigit(date[i]) ) + break; + if( i != 9 ){ + vmsg("輸入錯誤"); + break; + } snprintf(genbuf, sizeof(genbuf), "bin/builddb.pl -D %s %s", date, currboard); system(genbuf); |