From 83ec5b5b8ee7cae891fff59340be207b513a030d Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Sat, 21 Nov 2020 13:26:16 +0000
Subject: [PATCH] restore passphrase support when rendering PDF's

---
 coders/pdf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/coders/pdf.c b/coders/pdf.c
index 31efd06e5..ce4f7a5f1 100644
--- a/coders/pdf.c
+++ b/coders/pdf.c
@@ -611,14 +611,13 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
     (void) ConcatenateMagickString(options,"-dUseTrimBox ",MaxTextExtent);
   if (stop_on_error != MagickFalse)
     (void) ConcatenateMagickString(options,"-dPDFSTOPONERROR ",MaxTextExtent);
-  option=GetImageOption(image_info,"authenticate");
-  if (option != (char *) NULL)
+  if (image_info->authenticate != (char *) NULL)
     {
       char
         passphrase[MagickPathExtent],
         *sanitize_passphrase;
 
-      sanitize_passphrase=SanitizeDelegateString(option);
+      sanitize_passphrase=SanitizeDelegateString(image_info->authenticate);
       (void) FormatLocaleString(passphrase,MagickPathExtent,
         "'-sPDFPassword=%s' ",sanitize_passphrase);
       sanitize_passphrase=DestroyString(sanitize_passphrase);
