From: amosjeffries <> Date: Thu, 2 Aug 2007 10:15:26 +0000 (+0000) Subject: Fix AuthBasicUserRequest::authenticated() assert checking the wrong value. X-Git-Tag: SQUID_3_0_PRE7~123 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e6e1767bc3ccd6ca88d09d47edae75bd7a49acf;p=thirdparty%2Fsquid.git Fix AuthBasicUserRequest::authenticated() assert checking the wrong value. Was testing dynamic_cast input for NULL after the fact, should have been testing the output to include NULL from cast error as well as NULL input. --- diff --git a/src/auth/basic/auth_basic.cc b/src/auth/basic/auth_basic.cc index d47b7762fc..68368c8e87 100644 --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/auth_basic.cc @@ -1,5 +1,5 @@ /* - * $Id: auth_basic.cc,v 1.49 2007/08/01 23:12:33 amosjeffries Exp $ + * $Id: auth_basic.cc,v 1.50 2007/08/02 04:15:26 amosjeffries Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -143,7 +143,7 @@ int AuthBasicUserRequest::authenticated() const { BasicUser const *basic_auth = dynamic_cast(user()); - assert (user()); + assert (basic_auth != NULL); if (basic_auth->authenticated()) return 1;