Index: fpdfsdk/fpdfview.cpp |
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp |
index 959bf143909b23b83876217de6b198f9ad8c12cd..3f5115afd622126efd8b6859ef2f8e42339a2ec3 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 { |