diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 12:33:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 12:33:19 -0500 |
commit | ec1248e70edc5cf7b485efcc7b41e44e10f422e5 (patch) | |
tree | 80ca10a1ad9dc572e131a56a93fcf0c63c14d168 /crypto/deflate.c | |
parent | 3d1f337b3e7378923c89f37afb573a918ef40be5 (diff) | |
parent | 55e9dce37ddf3ab358ba1d1e9eef4ee4bd8174a6 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] aes: Fixed array boundary violation
[CRYPTO] tcrypt: Fix key alignment
[CRYPTO] all: Add missing cra_alignmask
[CRYPTO] all: Use kzalloc where possible
[CRYPTO] api: Align tfm context as wide as possible
[CRYPTO] twofish: Use rol32/ror32 where appropriate
Diffstat (limited to 'crypto/deflate.c')
-rw-r--r-- | crypto/deflate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/deflate.c b/crypto/deflate.c index bc73342cd1ec..f209368d62ae 100644 --- a/crypto/deflate.c +++ b/crypto/deflate.c | |||
@@ -73,12 +73,11 @@ static int deflate_decomp_init(struct deflate_ctx *ctx) | |||
73 | int ret = 0; | 73 | int ret = 0; |
74 | struct z_stream_s *stream = &ctx->decomp_stream; | 74 | struct z_stream_s *stream = &ctx->decomp_stream; |
75 | 75 | ||
76 | stream->workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); | 76 | stream->workspace = kzalloc(zlib_inflate_workspacesize(), GFP_KERNEL); |
77 | if (!stream->workspace ) { | 77 | if (!stream->workspace ) { |
78 | ret = -ENOMEM; | 78 | ret = -ENOMEM; |
79 | goto out; | 79 | goto out; |
80 | } | 80 | } |
81 | memset(stream->workspace, 0, zlib_inflate_workspacesize()); | ||
82 | ret = zlib_inflateInit2(stream, -DEFLATE_DEF_WINBITS); | 81 | ret = zlib_inflateInit2(stream, -DEFLATE_DEF_WINBITS); |
83 | if (ret != Z_OK) { | 82 | if (ret != Z_OK) { |
84 | ret = -EINVAL; | 83 | ret = -EINVAL; |