summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-09 23:02:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-09 23:29:49 +0300
commit2a773d816c752a31ae2e4d007cf0503d7bf8a876 (patch)
treeb9383bbed094ecf705d5a16d1a350e33d25b8315
parenta5a5e617161531f48a9807f9e14765a545b711ec (diff)
downloadhercules-s20160814.tar.gz
hercules-s20160814.tar.bz2
hercules-s20160814.tar.xz
hercules-s20160814.zip
Fix login server null pointer access if packet handler in plugin initiate server termination.s20160814
-rw-r--r--src/login/login.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 7f5f78a4d..6b422eef2 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -817,8 +817,11 @@ int login_parse_fromchar(int fd)
if (VECTOR_LENGTH(HPM->packets[hpParse_FromChar]) > 0) {
int result = HPM->parse_packets(fd,command,hpParse_FromChar);
- if (result == 1)
+ if (result == 1) {
+ if (sockt->session[fd] == NULL)
+ return 0;
continue;
+ }
if (result == 2)
return 0;
}