summaryrefslogtreecommitdiff
path: root/fpdfsdk/src
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:20:28 -0800
commitdc43b322915c5256a5a9458e6b8cd28bcecf91ae (patch)
tree678d12670f54485277517f2478e0f397fd63c7c7 /fpdfsdk/src
parent0185408126529d5df7e095c5789affd4ae971375 (diff)
downloadpdfium-dc43b322915c5256a5a9458e6b8cd28bcecf91ae.tar.xz
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')
-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 87ef3ee5b2..3f6bdd94b3 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -817,7 +817,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_
return name_tree.LookupNamedDest(pDoc, name);
}
-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;
@@ -859,7 +859,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;
}