Skip to content

Commit

Permalink
CmsContext: Fix small openssl BIO struct leak in AppendData()
Browse files Browse the repository at this point in the history
  • Loading branch information
ceztko committed Dec 7, 2023
1 parent d3e5f93 commit 24b19f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/podofo/private/CmsContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ void CmsContext::AppendData(const bufferview& data)
// Append data to the internal CMS buffer and elaborate
// See also CMS_final implementation for reference
if (!SMIME_crlf_copy(mem, m_databio, CMS_FLAGS))
PODOFO_RAISE_ERROR_INFO(PdfErrorCode::OpenSSL, "BIO_new_mem_buf");
PODOFO_RAISE_ERROR_INFO(PdfErrorCode::OpenSSL, "SMIME_crlf_copy");

(void)BIO_flush(m_databio);
BIO_free(mem);
}

void CmsContext::ComputeHashToSign(charbuff& hashToSign)
Expand Down

0 comments on commit 24b19f0

Please sign in to comment.