From de35955a5161631299c5f45472949d8ecd18136a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 Apr 2015 19:58:53 +0300 Subject: Add checks to loginlog_sql.c --- src/login/loginlog_sql.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/login') diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c index 5654b4c5b..8ed6e395a 100644 --- a/src/login/loginlog_sql.c +++ b/src/login/loginlog_sql.c @@ -11,6 +11,7 @@ #include "../common/cbasetypes.h" #include "../common/mmo.h" +#include "../common/nullpo.h" #include "../common/socket.h" #include "../common/sql.h" #include "../common/strlib.h" @@ -67,6 +68,8 @@ void login_log(uint32 ip, const char* username, int rcode, const char* message) char esc_message[255*2+1]; int retcode; + nullpo_retv(username); + nullpo_retv(message); if( !enabled ) return; @@ -137,6 +140,8 @@ bool loginlog_config_read(const char* key, const char* value) { const char* signature; + nullpo_ret(key); + nullpo_ret(value); signature = "sql."; if( strncmpi(key, signature, strlen(signature)) == 0 ) { -- cgit v1.2.3-60-g2f50