Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
f3e48d4
)
Thrift-1467:Possible AV with empty strings when using JSON protocol
author
Jake Farrell
<jfarrell@apache.org>
Thu, 15 Dec 2011 20:50:31 +0000
(20:50 +0000)
committer
Jake Farrell
<jfarrell@apache.org>
Thu, 15 Dec 2011 20:50:31 +0000
(20:50 +0000)
Client:delphi
Patch: Jens Geyer
Fixes exception raised on empty json strings.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@
1214955
13f79535
-47bb-0310-9956-
ffa450edef68
lib/delphi/src/Thrift.Protocol.JSON.pas
patch
|
blob
|
history
diff --git
a/lib/delphi/src/Thrift.Protocol.JSON.pas
b/lib/delphi/src/Thrift.Protocol.JSON.pas
index
6fd6493
..
34338d5
100644
(file)
--- a/
lib/delphi/src/Thrift.Protocol.JSON.pas
+++ b/
lib/delphi/src/Thrift.Protocol.JSON.pas
@@
-842,7
+842,7
@@
begin
end;
SetLength( result, buffer.Size);
- Move( buffer.Memory^, result[0], Length(result));
+
if buffer.Size > 0 then
Move( buffer.Memory^, result[0], Length(result));
finally
buffer.Free;