On Saturday, February 20, 2016 at 9:52:11 PM UTC-5, John Lester Romano 
wrote:
>
> Hi, I've been spending quite a while on how to resolve this issue. But 
> can't seem to find a way with this. I have used this sample program. 
> https://www.cryptopp.com/wiki/CMAC 
> But I am having errors. Please see screenshot....
>
> ... I have tried to do it in a separate workstation. Recompile the 
> library. Then I'm having the same problem. 
>

The assert basically says, "provide a valid pointer and a valid size" or 
"provide a NULL pointer and 0 size".

I'm guessing a filter is doing something like calling update with a NULL 
pointer and non-0 size; or a non-NULL pointer with a 0 size. Neither really 
makes any sense.

This should fix it. It tested OK under both the test suite and test vectors.

$ git diff filters.cpp
diff --git a/filters.cpp b/filters.cpp
index 6b09a02..78fd635 100644
--- a/filters.cpp
+++ b/filters.cpp
@@ -780,7 +780,8 @@ size_t HashFilter::Put2(const byte *inString, size_t 
length, int messageEnd, boo
        FILTER_BEGIN;
        if (m_putMessage)
                FILTER_OUTPUT3(1, 0, inString, length, 0, 
m_messagePutChannel);
-       m_hashModule.Update(inString, length);
+       if (inString && length)
+               m_hashModule.Update(inString, length);^M
        if (messageEnd)
        {
                {

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to