-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic in vcard4::parser::VcardParser::parse_property_value
: "byte index ... is not a char boundary"
#14
Comments
Thanks for the bug report @tniessen , I would like to figure out what's going wrong here, it's either going to be the character encoding or multibyte UTF-8 characters not being handled properly. Can you please first check if the input is valid UTF8 (I think it is but let's check), something like this: let buf = std::fs::read(path).unwrap();
let str = std::str::from_utf8(&buf).unwrap(); Thanks 👍 |
IIRC I don't parse Will take another look though. |
Oh I just saw the |
Hey @tniessen, it looks like the issue was using Can you try your input against the code in the I added a test so I think we are good but let's just check first please 👍 Also can you raise a separate issue for your |
@tmpfs Thank you for the amazing and fast work on this! The input files are indeed valid UTF-8, but you are right, this is not because of the The |
Cool @tniessen, that's merged and the |
Thank you @tmpfs! |
Hi, and thanks for providing this crate! I am using
vcard4
on semi-trusted inputs and unfortunately, some input files result in panics:To get
vcard4
to work, I had to use this workaround in the first place:I unfortunately cannot share the input files, but I hope that the stack trace might be helpful. My assumption is that the
PHOTO
value is decoded but treated as text instead of binary data, but I honestly don't have much insight into the file format.The text was updated successfully, but these errors were encountered: