Reading the source, from master, it does appear to only write `ctx->digest->ctx_size` bytes to `md`.