diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-09 23:02:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-10 16:15:35 +0300 |
commit | 9b3b068f5f2951238a470c535e038495a54383a3 (patch) | |
tree | 0a9e5a76ceb3e63b5339b3e267244cb8338e003a /src/login/login.c | |
parent | 2731ce5374e14db47691e1b3f7d00773369de835 (diff) | |
download | hercules-9b3b068f5f2951238a470c535e038495a54383a3.tar.gz hercules-9b3b068f5f2951238a470c535e038495a54383a3.tar.bz2 hercules-9b3b068f5f2951238a470c535e038495a54383a3.tar.xz hercules-9b3b068f5f2951238a470c535e038495a54383a3.zip |
Fix login and char servers null pointer access if packet handler in plugin initiate server termination.
Diffstat (limited to 'src/login/login.c')
-rw-r--r-- | src/login/login.c | 5 |
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; } |