Am 16.07.2015 um 18:04 hat Radim Krčmář geschrieben: > Calling a function pointer that was cast from an incompatible function > results in undefined behavior. 'void *' isn't compatible with 'struct > XXX *', so we can't cast to nettle_cipher_func, but have to provide a > wrapper. (Conversion from 'void *' to 'struct XXX *' might require > computation, which won't be done if we drop argument's true type and > pointers can have different sizes so passing arguments on stack would > bug.) > > Having two different prototypes based on nettle version doesn't make > this solution any nicer. > > Reported-by: Peter Maydell <peter.mayd...@linaro.org> > Signed-off-by: Radim Krčmář <rkrc...@redhat.com>
git bisect says that it's this commit which broke qemu-iotests 134. > +static void aes_decrypt_wrapper(cipher_ctx_t ctx, cipher_length_t length, > + uint8_t *dst, const uint8_t *src) > +{ > + aes_encrypt(ctx, length, dst, src); > +} And this is why (decrypt -> encrypt). I'll send a fix. Kevin