[apparmor] [PATCH] apparmor: use zstd compression for profile data

Georgia Garcia georgia.garcia at canonical.com
Fri Jun 3 21:59:23 UTC 2022


On Thu, 2022-05-12 at 12:35 -0500, Jon Tourville wrote:
> +       out_len = zstd_compress_cctx(ctx, out, out_len, src, slen, &params);
> +       if (zstd_is_error(out_len)) {
> +               ret = -EINVAL;
> +               goto cleanup;
>         }
>  
> -       *dst = dstbuf;
> -       *dlen = strm.total_out;
> +       *dst = out;
> +       *dlen = out_len;

Hi Jon,

Should the dst/out buffer be realloced to match the out_len returned by
zstd_compress_cctx? Or is the estimation made by zstd_compress_bound
accurate?

Regards,
Georgia




More information about the AppArmor mailing list