-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
It seams that the 'BSON_BIN_BINARY_OLD' test is swapped between length and data function :
MONGO_EXPORT int bson_iterator_bin_len( const bson_iterator *i ) {
return ( bson_iterator_bin_type( i ) == BSON_BIN_BINARY_OLD )
? bson_iterator_int_raw( i ) - 4
: bson_iterator_int_raw( i );
}
MONGO_EXPORT const char *bson_iterator_bin_data( const bson_iterator *i ) {
return ( bson_iterator_bin_type( i ) == BSON_BIN_BINARY_OLD )
? bson_iterator_value( i ) + 9
: bson_iterator_value( i ) + 5;
}