Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d73c039f
Kaydet (Commit)
d73c039f
authored
Eyl 05, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CID#1078782: fix memory leak
Change-Id: I4a98e68b5f74de787e28925e2e55de96f1cb980e
üst
faf66519
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
pdfwriter_impl.cxx
vcl/source/gdi/pdfwriter_impl.cxx
+6
-6
No files found.
vcl/source/gdi/pdfwriter_impl.cxx
Dosyayı görüntüle @
d73c039f
...
...
@@ -5993,7 +5993,7 @@ bool PDFWriterImpl::finalizeSignature()
// Prepare buffer and calculate PDF file digest
CHECK_RETURN( (osl_File_E_None == osl_setFilePos( m_aFile, osl_Pos_Absolut, 0) ) );
HASHContext *hc = HASH_Create(HASH_AlgSHA1
);
boost::scoped_ptr<HASHContext> hc(HASH_Create(HASH_AlgSHA1)
);
if (!hc)
{
...
...
@@ -6001,7 +6001,7 @@ bool PDFWriterImpl::finalizeSignature()
return false;
}
HASH_Begin(hc);
HASH_Begin(hc
.get()
);
char *buffer = new char[m_nSignatureContentOffset + 1];
sal_uInt64 bytesRead;
...
...
@@ -6012,7 +6012,7 @@ bool PDFWriterImpl::finalizeSignature()
if (bytesRead != (sal_uInt64)m_nSignatureContentOffset - 1)
SAL_WARN("vcl.gdi", "PDF Signing: First buffer read failed!");
HASH_Update(hc, reinterpret_cast<const unsigned char*>(buffer), bytesRead);
HASH_Update(hc
.get()
, reinterpret_cast<const unsigned char*>(buffer), bytesRead);
delete[] buffer;
CHECK_RETURN( (osl_File_E_None == osl_setFilePos( m_aFile, osl_Pos_Absolut, m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH + 1) ) );
...
...
@@ -6021,14 +6021,14 @@ bool PDFWriterImpl::finalizeSignature()
if (bytesRead != (sal_uInt64) nLastByteRangeNo)
SAL_WARN("vcl.gdi", "PDF Signing: Second buffer read failed!");
HASH_Update(hc, reinterpret_cast<const unsigned char*>(buffer), bytesRead);
HASH_Update(hc
.get()
, reinterpret_cast<const unsigned char*>(buffer), bytesRead);
delete[] buffer;
SECItem digest;
unsigned char hash[SHA1_LENGTH];
digest.data = hash;
HASH_End(hc, digest.data, &digest.len, SHA1_LENGTH);
HASH_Destroy(hc);
HASH_End(hc
.get()
, digest.data, &digest.len, SHA1_LENGTH);
HASH_Destroy(hc
.get()
);
const char *pass = OUStringToOString( m_aContext.SignPassword, RTL_TEXTENCODING_UTF8 ).getStr();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment