[Poppler-bugs] [Bug 103873] pdfunite introduces syntax error / illegal characters (as per pdfinfo)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 13 08:35:03 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103873

--- Comment #10 from Adrian Johnson <ajohnson at redneon.com> ---
(In reply to Albert Astals Cid from comment #9)
> Before commiting this patch, anyone can explain the 
> 
> "printf didn't accept invalid UTF8 sequences in the format string"
> 
> part a bit more? What's invalid in that code?

Only the first byte in a UTF-8 sequence can start with '11' (in binary). The
second and subsequent bytes must start with '10'.

0xE2, 0xE3 is 11100010, 11100011

I assume the printf implementation is trying to parse the format string one
character at a time in the current locale in order to pick off the conversion
specifiers. I'm not sure what the standards say about this but it is probably
best to avoid putting arbitrary binary sequences in the format string.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20171213/b09d066a/attachment.html>


More information about the Poppler-bugs mailing list