summaryrefslogtreecommitdiff
blob: 4a5c0df922fad00b2969d2635dbfc85fda097076 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Gentoo-bug: 630682 (CVE-2017-14226)

Change-Id: I0d8d6887fa360c05d5f9e2a070410c77926b9ce1
Reviewed-on: https://gerrit.libreoffice.org/42054
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>

--- a/src/lib/WP5StylesListener.cpp
+++ b/src/lib/WP5StylesListener.cpp
@@ -85,8 +85,9 @@
 		m_currentPage = WPXPageSpan(m_pageList.back(), 0.0, 0.0);
 		m_currentPage.setPageSpan(1);
 
-		for (std::vector<WPXHeaderFooter>::const_iterator HFiter = (m_nextPage.getHeaderFooterList()).begin();
-		        HFiter != (m_nextPage.getHeaderFooterList()).end(); ++HFiter)
+		std::vector<WPXHeaderFooter> headerFooterList = m_nextPage.getHeaderFooterList();
+		for (std::vector<WPXHeaderFooter>::const_iterator HFiter = headerFooterList.begin();
+		        HFiter != headerFooterList.end(); ++HFiter)
 		{
 			if ((*HFiter).getOccurrence() != NEVER)
 			{
--- a/src/lib/WP42StylesListener.cpp
+++ b/src/lib/WP42StylesListener.cpp
@@ -84,8 +84,9 @@
 			m_currentPage = WPXPageSpan(m_pageList.back(), 0.0, 0.0);
 			m_currentPage.setPageSpan(1);
 
-			for (std::vector<WPXHeaderFooter>::const_iterator HFiter = (m_nextPage.getHeaderFooterList()).begin();
-			        HFiter != (m_nextPage.getHeaderFooterList()).end(); ++HFiter)
+			std::vector<WPXHeaderFooter> headerFooterList = m_nextPage.getHeaderFooterList();
+			for (std::vector<WPXHeaderFooter>::const_iterator HFiter = headerFooterList.begin();
+			        HFiter != headerFooterList.end(); ++HFiter)
 			{
 				if ((*HFiter).getOccurrence() != NEVER)
 				{
--- a/src/lib/WP1StylesListener.cpp
+++ b/src/lib/WP1StylesListener.cpp
@@ -83,8 +83,9 @@
 			m_currentPage = WPXPageSpan(m_pageList.back(), 0.0, 0.0);
 			m_currentPage.setPageSpan(1);
 
-			for (std::vector<WPXHeaderFooter>::const_iterator HFiter = (m_nextPage.getHeaderFooterList()).begin();
-			        HFiter != (m_nextPage.getHeaderFooterList()).end(); ++HFiter)
+			std::vector<WPXHeaderFooter> headerFooterList = m_nextPage.getHeaderFooterList();
+			for (std::vector<WPXHeaderFooter>::const_iterator HFiter = headerFooterList.begin();
+			        HFiter != headerFooterList.end(); ++HFiter)
 			{
 				if ((*HFiter).getOccurrence() != NEVER)
 				{