summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_sysfontinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_sysfontinfo.cpp')
-rw-r--r--fpdfsdk/fpdf_sysfontinfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp
index 5bce4b4cc4..3d15ca3a41 100644
--- a/fpdfsdk/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/fpdf_sysfontinfo.cpp
@@ -159,7 +159,9 @@ static unsigned long DefaultGetFaceName(struct _FPDF_SYSFONTINFO* pThis,
return 0;
if (name.GetLength() >= (long)buf_size)
return name.GetLength() + 1;
- FXSYS_strcpy(buffer, name.c_str());
+
+ strncpy(buffer, name.c_str(),
+ (name.GetLength() + 1) * sizeof(CFX_ByteString::CharType));
return name.GetLength() + 1;
}