diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-02-24 17:34:58 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-03-05 16:44:15 +0100 |
commit | 8ad04451f74e015dca9e78d22c64b1642d237be5 (patch) | |
tree | d4d48949479a875688563b91c36679cfbfd5400f /vcl | |
parent | 8aa7a9643ca73d00f932a2c59d9468ef8d006d42 (diff) |
tdf#84881: Move some variables one block level out
It it scary to keep pointers to stack variables that have gone out of scope in
a data structure that is in an outer block and used there later.
Change-Id: Iced8b809d50089a4e6f9867be9b8501cce59d16f
(cherry picked from commit 5ffeec96228e0adb829612ecb855cd28e2063f1d)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 174db9ec50c7..df316ce686ab 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6734,6 +6734,11 @@ bool PDFWriterImpl::finalizeSignature() return false; } + NSSCMSAttribute timestamp; + SECItem values[2]; + SECItem *valuesp = values; + SECOidData typetag; + // Now we have the hash algorithm as a SECItem available in cms_siger->digestAlg if( !m_aContext.SignTSA.isEmpty() ) { @@ -6913,20 +6918,15 @@ bool PDFWriterImpl::finalizeSignature() return false; } - NSSCMSAttribute timestamp; - // timestamp.type filled in below - SECItem values[2]; values[0] = response.timeStampToken; values[1].type = siBuffer; values[1].data = NULL; values[1].len = 0; - SECItem *valuesp = values; timestamp.values = &valuesp; - SECOidData typetag; typetag.oid.data = NULL; // id-aa-timeStampToken OBJECT IDENTIFIER ::= { iso(1) // member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) |