瀏覽代碼

* Sanity check for conf.bot->hub

svn: 1829
Bryan Drewery 21 年之前
父節點
當前提交
69499ae134
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/main.c

+ 6 - 0
src/main.c

@@ -513,11 +513,17 @@ static void check_autoaway()
 }
 }
 */
 */
 
 
+static int washub = -1;
+
 static void core_minutely()
 static void core_minutely()
 {
 {
   if (conf.bot->hub) 
   if (conf.bot->hub) 
     send_timesync(-1);
     send_timesync(-1);
   else {
   else {
+    if (washub == -1)
+      washub = conf.bot->hub;
+    else if (washub != conf.bot->hub)
+      fatal("MEMORY HACKED", 0);
     check_maxfiles();
     check_maxfiles();
     check_mypid();
     check_mypid();
   }
   }