diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-16 20:42:14 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-16 20:42:14 +0800 |
commit | a22f3dec4e71e3169bfb7fd8b5f597be04068c99 (patch) | |
tree | c79844f1fd03c2cc51c263f859ce442d4b36cd35 | |
parent | b83b3139e2e501b53a15eddf580a6fbecaa9b5d1 (diff) | |
download | pttbbs-a22f3dec4e71e3169bfb7fd8b5f597be04068c99.tar pttbbs-a22f3dec4e71e3169bfb7fd8b5f597be04068c99.tar.gz pttbbs-a22f3dec4e71e3169bfb7fd8b5f597be04068c99.tar.bz2 pttbbs-a22f3dec4e71e3169bfb7fd8b5f597be04068c99.tar.lz pttbbs-a22f3dec4e71e3169bfb7fd8b5f597be04068c99.tar.xz pttbbs-a22f3dec4e71e3169bfb7fd8b5f597be04068c99.tar.zst pttbbs-a22f3dec4e71e3169bfb7fd8b5f597be04068c99.zip |
* fix usernum range (1..MAX_USER)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4638 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/register.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c index df6fa4eb..ff714ff6 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -1029,7 +1029,7 @@ check_register(void) if (buf[0] == '#') { xun = atoi(buf+1); - if (xun < 0 || xun >= MAX_USERS || + if (xun <= 0 || xun > MAX_USERS || passwd_sync_query(xun, &u) < 0 || !(u.userlevel & (PERM_ACCOUNTS | PERM_ACCTREG))) memset(&u, 0, sizeof(u)); |