On Thu, Aug 18, 2022 at 07:01:19PM +0100, Giovanni Cabiddu wrote: > > + /* Handle acomp requests that require the allocation of a destination > + * buffer. The size of the destination buffer is double the source > + * buffer to fit the decompressed output or an expansion on the > + * data for compression. > + */ > + if (!areq->dst) { > + dlen = 2 * slen; > + areq->dst = sgl_alloc(dlen, f, NULL); > + if (!areq->dst) > + return -ENOMEM; > + } So what happens if the decompressed result is more than twice as long as the source? Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt