/[packages]/updates/5/libreoffice/current/SOURCES/0001-rtf-m_aStates-can-be-empty-in-the-inner-condition.patch
ViewVC logotype

Contents of /updates/5/libreoffice/current/SOURCES/0001-rtf-m_aStates-can-be-empty-in-the-inner-condition.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1038214 - (show annotations) (download)
Thu Jun 30 15:20:21 2016 UTC (7 years, 9 months ago) by tv
File size: 1628 byte(s)
CVE-2016-4324 fix (mga#18826)
1 From 4ce2689bf8616463d224ebfed1d5bc80691c6b8c Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Tue, 10 May 2016 09:34:58 +0100
4 Subject: [PATCH] rtf: m_aStates can be empty in the inner condition
5
6 Change-Id: Id262a3019a693f236630b798579f360c9462d12e
7 (cherry picked from commit 05cc87ce45fad402445c8d748817e386e56148af)
8 ---
9 writerfilter/source/rtftok/rtfdocumentimpl.cxx | 10 +++++++---
10 1 file changed, 7 insertions(+), 3 deletions(-)
11
12 diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
13 index 799186d..995772a 100644
14 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
15 +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
16 @@ -455,11 +455,15 @@ writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::getProperties(RT
17
18 // cloneAndDeduplicate() wants to know about only a single "style", so
19 // let's merge paragraph and character style properties here.
20 - int nCharStyle = m_aStates.top().nCurrentCharacterStyleIndex;
21 - RTFReferenceTable::Entries_t::iterator itChar = m_aStyleTableEntries.find(nCharStyle);
22 + RTFReferenceTable::Entries_t::iterator itChar = m_aStyleTableEntries.end();
23 + if (!m_aStates.empty())
24 + {
25 + int nCharStyle = m_aStates.top().nCurrentCharacterStyleIndex;
26 + itChar = m_aStyleTableEntries.find(nCharStyle);
27 + }
28 +
29 RTFSprms aStyleSprms;
30 RTFSprms aStyleAttributes;
31 -
32 // Ensure the paragraph style is a flat list.
33 lcl_copyFlatten(rProps, aStyleAttributes, aStyleSprms);
34
35 --
36 2.7.4
37

  ViewVC Help
Powered by ViewVC 1.1.30