Clarify what CPDFSDK_FormFillEnvironment::GetPermissions() does.

It checks if any bit in the in-param is set. Though no existing caller
actually asks GetPermissions() to check multiple bits.

Change-Id: I517e65738eafa7c71e45c6c96ed65995f794b2e3
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65618
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index 021ec60..c6c2e4f 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -744,6 +744,6 @@
   return pExtension ? pExtension->GetPageCount() : m_pCPDFDoc->GetPageCount();
 }
 
-bool CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) const {
-  return !!(m_pCPDFDoc->GetUserPermissions() & nFlag);
+bool CPDFSDK_FormFillEnvironment::GetPermissions(uint32_t flags) const {
+  return !!(m_pCPDFDoc->GetUserPermissions() & flags);
 }
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h
index ea67394..12119c7 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.h
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.h
@@ -76,7 +76,10 @@
   void ClearAllFocusedAnnots();
 
   int GetPageCount() const;
-  bool GetPermissions(int nFlag) const;
+
+  // See PDF Reference 1.7, table 3.20 for the permission bits. Returns true if
+  // any bit in |flags| is set.
+  bool GetPermissions(uint32_t flags) const;
 
   bool GetChangeMark() const { return m_bChangeMask; }
   void SetChangeMark() { m_bChangeMask = true; }