-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: BSON
-
None
Symbols in Ruby can include null bytes, but put_cstring assumes the symbols can be converted to null terminated strings. As a result, serializing a symbol using this method when the symbol contains null bytes truncates the data.
The proposed fix, to avoid behavior changes, is to raise ArgumentError when the symbol contains null bytes.
- depends on
-
RUBY-1961 Require Ruby 2.3+, JRuby 9.2+ in bson-ruby
- Closed
- links to