Closed wyager closed 5 years ago
Arguably a problem with https://hackage.haskell.org/package/base-4.10.1.0/docs/src/Foreign.Marshal.Alloc.html#mallocBytes
It doesn't complain on negative Int
s.
Should definitely also be checked here, however.
Thanks for reporting this. Can you provide a patch? I am working two projects at the moment, so it would take me some time to address this.
Apologies for the delay - forgot about this for some time.
Based on a quick grep through the code, I suspect I got all the problem cases.
Thank you very much!
Invalid AAD seems fine. Invalid ciphertext causes this error.
Looks like this happens when the ciphertext is too short.
My guess: There's a subtraction on
ssize_t
s/Word
s that is unchecked and underflows if the provided "ciphertext" is less than the padding length.