X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fidea%2Fi_ofb64.c;fp=crypto%2Fidea%2Fi_ofb64.c;h=246886bdc43ca494ffbef3cf73532d397db92c2e;hp=89ac18ce9189b91c077493423a9885269cfaf11d;hb=1634b2df9f12d3976129ba49e38638e3ab368e3d;hpb=fe10fa75216cb0e81eeee9bced2b4d26e05bf9e7 diff --git a/crypto/idea/i_ofb64.c b/crypto/idea/i_ofb64.c index 89ac18ce91..246886bdc4 100644 --- a/crypto/idea/i_ofb64.c +++ b/crypto/idea/i_ofb64.c @@ -35,6 +35,11 @@ void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out, unsigned char *iv; int save = 0; + if (n < 0) { + *num = -1; + return; + } + iv = (unsigned char *)ivec; n2l(iv, v0); n2l(iv, v1);