summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-09-18 16:48:31 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-18 16:48:31 +0000
commit6fc8d877d7450905623c6abb1094ab99f5bd80cb (patch)
tree6230e86ab012e53634e212d7256efde745d05d55 /core
parentdebba6d2124e780ce627be8e058a7ce5d81d5910 (diff)
downloadpdfium-6fc8d877d7450905623c6abb1094ab99f5bd80cb.tar.xz
Encode mark names when writing to file.
Bug: pdfium:1150 Change-Id: I7e589fb3d164dfc9b39a7a3f6e782c09331cc32d Reviewed-on: https://pdfium-review.googlesource.com/42630 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index ea1a1956ae..02aea78074 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -255,7 +255,7 @@ const CPDF_ContentMark* CPDF_PageContentGenerator::ProcessContentMarks(
const CPDF_ContentMarkItem* item = pNext->GetItem(i);
// Write mark tag.
- *buf << "/" << item->GetName() << " ";
+ *buf << "/" << PDF_NameEncode(item->GetName()) << " ";
// If there are no parameters, write a BMC (begin marked content) operator.
if (item->GetParamType() == CPDF_ContentMarkItem::None) {