From 9e424958d394ab4f5ab2c01ecd918cb069e0b0f0 Mon Sep 17 00:00:00 2001 From: Gavin Lin Date: Tue, 21 Aug 2018 03:34:04 -0700 Subject: [PATCH] fix a npc util buffer overflow bug --- gmsv/setup.cf | 2 +- gmsv/src/genver.h | 3 +-- gmsv/src/include/version.h | 2 +- gmsv/src/npc/npcutil.c | 2 +- saac/acserv.cf | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gmsv/setup.cf b/gmsv/setup.cf index c7ed63a..bd834cd 100755 --- a/gmsv/setup.cf +++ b/gmsv/setup.cf @@ -457,7 +457,7 @@ acserv=127.0.0.1 # Account Server Port # 帐号服务器 SAAC的服务器端口 #acservport=9208 -acservport=9300 +acservport=9301 # Account Server password # 连接到帐号服务器 SAAC的密码 acpasswd=test diff --git a/gmsv/src/genver.h b/gmsv/src/genver.h index f6152f9..dcda6b7 100644 --- a/gmsv/src/genver.h +++ b/gmsv/src/genver.h @@ -295,7 +295,6 @@ char *genver= "_PETSKILL_2TIMID // (可开) Change 怯战第二版(狂狮怒吼)\n" "CAVALRY_DEBUG // (暂时开) Change 座骑攻击除错中\n" "_SHOW_FUSION // (可开) Change 融合宠物在CLIENT端只显示转生数,修改为融合宠显示为融合(client端也要开)\n" -"_CONTRACT // (可开) Robin 契约功能 \n" "_FONT_SIZE // (可开) Robin 字型大小功能\n" "_PROSK99 // (可开) Change 检查职技等级送白狼\n" "_TIME_TICKET // Robin 限时入场 森林捉宠用\n" @@ -319,5 +318,5 @@ char *genver= "_GM_METAMO_RIDE // GM人物骑所有宠\n" "_GM_RIDE // GM命令设置骑宠权限\n" "_LOCK_IP // 锁定IP\n" -"<>" +"<>" "by : 龙zoro工作室"; diff --git a/gmsv/src/include/version.h b/gmsv/src/include/version.h index ec10c2d..af6c866 100644 --- a/gmsv/src/include/version.h +++ b/gmsv/src/include/version.h @@ -532,7 +532,7 @@ Game Server 游戏环境: #define _PETSKILL_2TIMID // (可开) Change 怯战第二版(狂狮怒吼) #define CAVALRY_DEBUG // (暂时开) Change 座骑攻击除错中 #define _SHOW_FUSION // (可开) Change 融合宠物在CLIENT端只显示转生数,修改为融合宠显示为融合(client端也要开) -#define _CONTRACT // (可开) Robin 契约功能 +//#define _CONTRACT // (可开) Robin 契约功能 #define _FONT_SIZE // (可开) Robin 字型大小功能 #define _PROSK99 // (可开) Change 检查职技等级送白狼 #define _TIME_TICKET // Robin 限时入场 森林捉宠用 diff --git a/gmsv/src/npc/npcutil.c b/gmsv/src/npc/npcutil.c index 59a293b..818df20 100644 --- a/gmsv/src/npc/npcutil.c +++ b/gmsv/src/npc/npcutil.c @@ -1074,7 +1074,7 @@ static char *NPC_Util_MargeStrFromArgFile( char *filename, char *buf, int len) FILE *fp; char *cret = NULL; char line[NPC_UTIL_GETARGSTR_LINEMAX]; - char opfile[32]; + char opfile[64]; sprintf( opfile, "%s/", getNpcdir( ) ); strcat( opfile, filename); diff --git a/saac/acserv.cf b/saac/acserv.cf index e77dba2..e893b35 100644 --- a/saac/acserv.cf +++ b/saac/acserv.cf @@ -7,7 +7,7 @@ sql_Table logindata sql_LOCK user_lock AutoReg 1 -port 9300 +port 9301 pass test rotale_internal 1000