File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
#[ macro_use]
3
3
extern crate libfuzzer_sys;
4
4
extern crate bson;
5
- use bson:: { serde_helpers :: Utf8LossyDeserialization , Document } ;
5
+ use bson:: { Document , Utf8Lossy } ;
6
6
7
7
fuzz_target ! ( |buf: & [ u8 ] | {
8
- if let Ok ( doc) = bson:: deserialize_from_slice:: <Utf8LossyDeserialization <Document >>( buf) {
8
+ if let Ok ( doc) = bson:: deserialize_from_slice:: <Utf8Lossy <Document >>( buf) {
9
9
let _ = bson:: serialize_to_vec( & doc. 0 ) ;
10
10
}
11
11
} ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ use bson::{
21
21
cstr,
22
22
doc,
23
23
oid:: ObjectId ,
24
- serde_helpers:: Utf8LossyDeserialization ,
25
24
spec:: BinarySubtype ,
26
25
Binary ,
27
26
Bson ,
@@ -43,6 +42,7 @@ use bson::{
43
42
RawRegexRef ,
44
43
Regex ,
45
44
Timestamp ,
45
+ Utf8Lossy ,
46
46
Uuid ,
47
47
} ;
48
48
@@ -1336,5 +1336,5 @@ fn invalid_length() {
1336
1336
fn code_with_scope_too_long ( ) {
1337
1337
// This is a regression test for fuzzer-generated input (RUST-2241).
1338
1338
let bytes = base64:: decode ( "KAAAAAsBCRwPAAAACwFAAAAEAA8AEAAAAAYAAAAA9wD5/wAABgALAA==" ) . unwrap ( ) ;
1339
- assert ! ( bson:: deserialize_from_slice:: <Utf8LossyDeserialization <Document >>( & bytes) . is_err( ) ) ;
1339
+ assert ! ( bson:: deserialize_from_slice:: <Utf8Lossy <Document >>( & bytes) . is_err( ) ) ;
1340
1340
}
You can’t perform that action at this time.
0 commit comments