From fa4071bb522d7aad069ca24bafedb597455e95b0 Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 29 Apr 2015 02:30:46 +1000 Subject: [PATCH] tdf#63054: pdf_string_parser incorrectly handles escapes This patch fixes the escapes handling by avoiding boost built-in functions that skip whitespaces behind the scenes. Change-Id: I9607ecd9e2e052aadcba69cf30ec25c981743c49 Reviewed-on: https://gerrit.libreoffice.org/15562 Tested-by: Jenkins Tested-by: David Tardon Reviewed-by: David Tardon --- sdext/source/pdfimport/pdfparse/pdfparse.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx index 6419040d8bd7..7600d3c6a6d9 100644 --- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -116,8 +116,8 @@ public: else if( c == '\\' ) // ignore escaped braces { ++len; - ++scan; - if( scan.at_end() ) + ++scan.first; // tdf#63054: avoid skipping spaces + if( scan.first == scan.last ) // tdf#63054: avoid skipping spaces break; } ++len;