Explorar el Código

* Fixed some potential sharing problems while loading userfile

svn: 2121
Bryan Drewery hace 21 años
padre
commit
b1a32402f1
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/users.c

+ 2 - 0
src/users.c

@@ -708,6 +708,7 @@ int readuserfile(const char *file, struct userrec **ret)
              putlog(LOG_MISC, "*", "Channel parsing error in userfile on line %d", line);
              putlog(LOG_MISC, "*", "Channel parsing error in userfile on line %d", line);
              free(my_ptr);
              free(my_ptr);
              fclose(f);
              fclose(f);
+             noshare = 0;
              return 0;
              return 0;
            }
            }
            free(my_ptr);
            free(my_ptr);
@@ -831,6 +832,7 @@ int readuserfile(const char *file, struct userrec **ret)
 	    putlog(LOG_MISC, "*", "* Corrupt user record line: %d!", line);
 	    putlog(LOG_MISC, "*", "* Corrupt user record line: %d!", line);
 	    lasthand[0] = 0;
 	    lasthand[0] = 0;
             fclose(f);
             fclose(f);
+            noshare = 0;
             return 0;
             return 0;
 	  } else {
 	  } else {
             int isbot = 0;
             int isbot = 0;