Help save net neutrality! Learn more.
Close

#39 access violation bug (found/fixed)

open
nobody
None
5
2011-11-10
2011-11-10
Anonymous
No

Folowing exception will be not throwed, cause AuthenticatedSymmetricCipher is NULL - we have access violation here :
if (!allowAuthenticatedSymmetricCipher && dynamic_cast<AuthenticatedSymmetricCipher *>(&c) != 0)
throw InvalidArgument("StreamTransformationFilter: please use AuthenticatedEncryptionFilter and AuthenticatedDecryptionFilter for AuthenticatedSymmetricCipher");

In the patch i have changed "&&" with "||" ... (- i think its better :)

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-12-22

    I believe the logical AND (&&) is correct in this case. !(a && b) is equivalent to !a || !b (boolean logic).