lz4.c (42249094f79422fbf5ed4b54eeb48ff096809b8f) lz4.c (d801ab204b5a500b66ca285ac7b440cc79933a27)
1/*
2 * Cryptographic API.
3 *
4 * Copyright (c) 2013 Chanho Min <chanho.min@lge.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.

--- 54 unchanged lines hidden (view full) ---

63
64static int lz4_decompress_crypto(struct crypto_tfm *tfm, const u8 *src,
65 unsigned int slen, u8 *dst, unsigned int *dlen)
66{
67 int err;
68 size_t tmp_len = *dlen;
69 size_t __slen = slen;
70
1/*
2 * Cryptographic API.
3 *
4 * Copyright (c) 2013 Chanho Min <chanho.min@lge.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.

--- 54 unchanged lines hidden (view full) ---

63
64static int lz4_decompress_crypto(struct crypto_tfm *tfm, const u8 *src,
65 unsigned int slen, u8 *dst, unsigned int *dlen)
66{
67 int err;
68 size_t tmp_len = *dlen;
69 size_t __slen = slen;
70
71 err = lz4_decompress(src, &__slen, dst, tmp_len);
71 err = lz4_decompress_unknownoutputsize(src, __slen, dst, &tmp_len);
72 if (err < 0)
73 return -EINVAL;
74
75 *dlen = tmp_len;
76 return err;
77}
78
79static struct crypto_alg alg_lz4 = {

--- 27 unchanged lines hidden ---
72 if (err < 0)
73 return -EINVAL;
74
75 *dlen = tmp_len;
76 return err;
77}
78
79static struct crypto_alg alg_lz4 = {

--- 27 unchanged lines hidden ---