* user_ops.c: reject NULL password in CtdlTryPassword() instead of crashing
authorArt Cancro <ajc@citadel.org>
Mon, 15 Jan 2001 23:59:26 +0000 (23:59 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 15 Jan 2001 23:59:26 +0000 (23:59 +0000)
citadel/ChangeLog
citadel/support.c
citadel/user_ops.c

index 16ccd7b57a6d0961d8fe5b09ce9df15206e6e27c..e78ade58888ee4a8215ada08195669e45500de9c 100644 (file)
@@ -1,6 +1,7 @@
  $Log$
- Revision 573.69  2001/01/15 20:34:29  ajc
- *** empty log message ***
+ Revision 573.70  2001/01/15 23:59:26  ajc
+ * user_ops.c: reject NULL password in CtdlTryPassword() instead of crashing
+
 
  Revision 573.68  2001/01/15 20:34:04  ajc
  * "Path:" removed for now because it confuses brain-dead Microsoft shitware
index 99284f6c739195e47a630e194edce4d10f86809a..e0a098fd427075772dd55daeeee99f1335e02f3c 100644 (file)
@@ -23,6 +23,7 @@ void strproc(char *string)
 {
        int a;
 
+       if (string == NULL) return;
        if (strlen(string)==0) return;
 
        /* Convert non-printable characters to blanks */
index 4350f630fbf4ba4bd781f018bd54ed436f5e780c..cf39c2403a532b3d208c7d2c78e990ad8182c0a9 100644 (file)
@@ -494,6 +494,9 @@ int CtdlTryPassword(char *password)
        if (getuser(&CC->usersupp, CC->curr_user)) {
                return pass_internal_error;
        }
+       if (password == NULL) {
+               return pass_wrong_password;
+       }
        code = (-1);
        if (CC->usersupp.uid == BBSUID) {
                strproc(password);