lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wm6ytb9m.fsf@trenco.lwn.net>
Date: Wed, 20 Aug 2025 06:42:29 -0600
From: Jonathan Corbet <corbet@....net>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>, Linux Doc Mailing
 List <linux-doc@...r.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>, Mauro Carvalho Chehab
 <mchehab+huawei@...nel.org>, Kees Cook <mchehab+huawei@...nel.org>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] docs: kfigure.py: don't crash during read/write

Mauro Carvalho Chehab <mchehab+huawei@...nel.org> writes:

> By default, Python does a very bad job when reading/writing
> from files, as it tries to enforce that the character is < 128.
> Nothing prevents a SVG file to contain, for instance, a comment
> with an utf-8 accented copyright notice - or even an utf-8
> invalid char.

Do you have a locale that expects everything to be ASCII?  This seems a
bit weird.  I would expect utf8 to work by default these days.

> While testing PDF and html builds, I recently faced one build
> that got an error at kfigure.py saying that a char was > 128,
> crashing PDF output.
>
> To avoid such issues, let's use PEP 383 subrogate escape encoding
> to prevent read/write errors on such cases.

Being explicit about utf8 is good...but where are the errors coming
from?  Is this really a utf8 file?

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ