You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2011/12/15 21:50:31 UTC

svn commit: r1214955 - /thrift/trunk/lib/delphi/src/Thrift.Protocol.JSON.pas

Author: jfarrell
Date: Thu Dec 15 20:50:31 2011
New Revision: 1214955

URL: http://svn.apache.org/viewvc?rev=1214955&view=rev
Log:
Thrift-1467:Possible AV with empty strings when using JSON protocol
Client:delphi
Patch: Jens Geyer

Fixes exception raised on empty json strings.


Modified:
    thrift/trunk/lib/delphi/src/Thrift.Protocol.JSON.pas

Modified: thrift/trunk/lib/delphi/src/Thrift.Protocol.JSON.pas
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/delphi/src/Thrift.Protocol.JSON.pas?rev=1214955&r1=1214954&r2=1214955&view=diff
==============================================================================
--- thrift/trunk/lib/delphi/src/Thrift.Protocol.JSON.pas (original)
+++ thrift/trunk/lib/delphi/src/Thrift.Protocol.JSON.pas Thu Dec 15 20:50:31 2011
@@ -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;