You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the from_slice function panics if the input isn't a valid utf8 string instead of returning an error value.
Can be reproduced with this unit test:
#[cfg(test)]
mod test {
use crate::{Map,Value};
use crate::error::Result;
#[test]
pub fn invalid_utf8() {
let data: Vec<u8> = vec![155];
let mut sample: Result<Map<String, Value>> = crate::from_slice(&data);
}
}
The text was updated successfully, but these errors were encountered:
Hi
I found that the from_slice function panics if the input isn't a valid utf8 string instead of returning an error value.
Can be reproduced with this unit test:
The text was updated successfully, but these errors were encountered: