[Issue 17861] UTF Decode fails with exception

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 26 21:33:46 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17861

--- Comment #4 from Etienne <etcimon at gmail.com> ---
I was encountering this in the vibe.d parseJsonString function, when decoding
some Json string with user-generated data. About a year ago I found this was
the simplest way to patch this up but I'll run another test case. I don't
remember the exact trace but I see that it does use std.decode without the
replacementDchar option, so maybe that would solve it.

I remember it being due to phobos calling it though, not sure where. I have an
issue with the idea that string parsers can throw on a whim and break the
application, because as I said this user generated content can cause a crash
that way.

--


More information about the Digitalmars-d-bugs mailing list