diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-02-24 17:34:58 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-02-24 18:01:21 +0200 |
commit | 5ffeec96228e0adb829612ecb855cd28e2063f1d (patch) | |
tree | e9e746ce31e9f2fd5b3c2aa6997944de6ff7e015 | |
parent | 03736d673ad88d848f327d8c327ebc2dedeb986a (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
-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 d782bc1a4d5a..bb67eb7c8948 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6769,6 +6769,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() ) { @@ -6948,20 +6953,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) |