summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2015-01-21 14:20:28 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2015-01-21 14:24:36 -0800
commit70ad112e874cd076144cc1254db254ee651b5c81 (patch)
treec459b44c000bd60cd16c66dd18f46f7ccdada1da /fpdfsdk/src/fpdfview.cpp
parenta6f95eb2eb735e593f201a3ff9daad77c765cce0 (diff)
downloadpdfium-70ad112e874cd076144cc1254db254ee651b5c81.tar.xz
Merge to XFA: Use signed long for FPDF_GetNamedDest buffer length.
Need to have return value -1 indicating insufficient buffer. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/862163002
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index f084ce0da7..4114dac01c 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -1017,7 +1017,7 @@ FPDF_RESULT FPDF_BStr_Clear(FPDF_BSTR* str)
return 0;
}
-DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, unsigned long& buflen)
+DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, long& buflen)
{
if (!buffer)
buflen = 0;
@@ -1059,7 +1059,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index,
} else if (buflen >= len) {
memcpy(buffer, utf16Name.c_str(), len);
} else {
- len = -1;
+ buflen = -1;
}
return (FPDF_DEST)pDestObj;
}