Skip to content

Commit eb2dd6e

Browse files
2832
1 parent 67dfc60 commit eb2dd6e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/mongo/crypt/binding.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,11 @@ def self.kms_ctx_get_kms_provider(kms_context)
798798
if len_ptr.nil?
799799
nil
800800
else
801-
len = len_ptr.read(:uint32)
801+
len = if BSON::Environment.jruby?
802+
len_ptr.get_uint32
803+
else
804+
len_ptr.get(:uint32, 0)
805+
end
802806
provider.read_string(len).to_sym
803807
end
804808
end

0 commit comments

Comments
 (0)