Avoid CPDF_String instantiation in FPDFAttachment_GetStringValue()

Instead of instantiating a CPDF_String to ultimately call
PDF_DecodeText(), just call PDF_DecodeText() directly.

Change-Id: I9d97927b96561f1239c42c18d5ee21cb79acd93c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/119411
Reviewed-by: Thomas Sepez <tsepez@google.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_attachment.cpp b/fpdfsdk/fpdf_attachment.cpp
index 8c86b84..96434bf 100644
--- a/fpdfsdk/fpdf_attachment.cpp
+++ b/fpdfsdk/fpdf_attachment.cpp
@@ -200,8 +200,7 @@
       ByteString encoded =
           PDF_HexEncodeString(string_object->GetString().AsStringView());
       return Utf16EncodeMaybeCopyAndReturnLength(
-          pdfium::MakeRetain<CPDF_String>(nullptr, encoded)->GetUnicodeText(),
-          buffer_span);
+          PDF_DecodeText(encoded.unsigned_span()), buffer_span);
     }
   }