This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / crypto / cipher.c
index 6ab56eb..cdcf347 100644 (file)
@@ -52,8 +52,8 @@ static int crypt(struct crypto_tfm *tfm,
 {
        struct scatter_walk walk_in, walk_out;
        const unsigned int bsize = crypto_tfm_alg_blocksize(tfm);
-       u8 tmp_src[bsize];
-       u8 tmp_dst[bsize];
+       u8 tmp_src[nbytes > src->length ? bsize : 0];
+       u8 tmp_dst[nbytes > dst->length ? bsize : 0];
 
        if (!nbytes)
                return 0;