Index: fpdfsdk/src/javascript/app.cpp |
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp |
index a3e61c01abe6e22c593d8ab45b780d38779cdcc1..3cf3133b42bf83d791ab255a472b679481d01f9f 100644 |
--- a/fpdfsdk/src/javascript/app.cpp |
+++ b/fpdfsdk/src/javascript/app.cpp |
@@ -1111,10 +1111,8 @@ FX_BOOL app::response(OBJ_METHOD_PARAMS) |
} |
else |
{ |
- nLength = nLength>2046?2046:nLength; |
- pBuff[nLength] = 0; |
- pBuff[nLength+1] = 0; |
- swResponse = CFX_WideString::FromUTF16LE((unsigned short*)pBuff, nLength); |
+ nLength = nLength>2048?2048:nLength; |
palmer
2014/07/10 19:10:55
Why 2048?
It looks like you are removing the code
Bo Xu
2014/07/10 19:22:16
In line 1105, the pBuff is newed to be a length of
palmer
2014/07/11 00:12:29
So, does it matter if we effectively truncate the
Bo Xu
2014/07/11 03:02:38
The SDK only supports 2048 byte, so here is a hard
|
+ swResponse = CFX_WideString::FromUTF16LE((unsigned short*)pBuff, nLength/2); |
vRet = swResponse; |
} |
delete[] pBuff; |