Skip to content

Commit

Permalink
Write correct length of binary chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-kraemer committed Jun 26, 2011
1 parent 2b71401 commit 94e41d8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public void writeBinary(Base64Variant b64variant, byte subType,
_writeArrayFieldNameIfNeeded();
_verifyValueWrite("write binary");
_buffer.putByte(_typeMarker, BsonConstants.TYPE_BINARY);
_buffer.putInt(data.length);
_buffer.putInt(len);
_buffer.putByte(subType);
int end = offset + len;
if (end > data.length) {
Expand Down

0 comments on commit 94e41d8

Please sign in to comment.