summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 959bf14390..3f5115afd6 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -1110,7 +1110,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document,
int len = utf16Name.GetLength();
if (!buffer) {
*buflen = len;
- } else if (*buflen >= len) {
+ } else if (len <= *buflen) {
memcpy(buffer, utf16Name.c_str(), len);
*buflen = len;
} else {