3 ms·
> It's a done product — it's been one for quite a while. Could they just stop meddling with the UX already and maybe rewrite their PDF parser in a memory-safe l
by als0 4y ago
> It's a done product — it's been one for quite a while. Could they just stop meddling with the UX already and maybe rewrite their PDF parser in a memory-safe language instead?
Can't wait for this. And the same for the e-mail app. Even just a Swift rewrite of the 'hairy' parser code would be a reasonable starting point.
- thewebcount 4y agoCan you elaborate on what problem you have that this rewrite would solve? (Serious question, not trying to be combative.) I can't remember ever having any problem displaying a PDF in macOS, though I don't do anything particularly outlandish with PDFs these days. Does Preview crash frequently for you? (Or does displaying PDFs from within your own apps crash?) I haven't heard of this issue, so just curious what the problem is.
- grishka 4y agoThe problem is that writing a parser for a file format as complex as PDF in an unsafe language is just asking for trouble. There were many exploits already that involved a specially crafted PDF file to gain RCE, and there would probably be more, unless they do rewrite it. At this point we should just accept that it's next to impossible to write a 100% safe parser in an unsafe language.
- thewebcount 4y agoAh, I see what you mean. Yeah that makes total sense. Thanks for the explanation!