GNU bug report logs - #54263
29.0.50; color-values-from-color-spec accepts whitespace in rgbi: specifications

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Sat, 5 Mar 2022 17:06:01 UTC

Severity: normal

Found in version 29.0.50

Done: Mattias EngdegÄrd <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 54263 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 54263 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#54263: 29.0.50; color-values-from-color-spec accepts
 whitespace in rgbi: specifications
Date: Sun, 6 Mar 2022 12:12:08 +0100
[Message part 1 (text/plain, inline)]
6 mars 2022 kl. 11.45 skrev Philip Kaludercic <philipk <at> posteo.net>:

>  (should (equal (color-values-from-color-spec "rgbi:0/0/0x0") nil))
> 
> should be accepted or not.  From looking at xfaces-tests.el I was
> surprised to see that the exponential notation was intentional, but
> there was no comment or test on the un-lispy 0x... notation that strtod
> allows.

We could disallow hex floats (such as 0x1 or 0XDEFP-16) too, but whether they are un-lispy or not should have no bearing on our decision because we are parsing an external representation that doesn't come from the Lisp world.

Finding an authoritative source for the rgbi: format proved elusive but it doesn't seem that X11 or NS allow hex floats so let's reject them. New patch attached.

[0001-Don-t-accept-whitespace-or-hex-floats-in-rgbi-colour.patch (application/octet-stream, attachment)]

This bug report was last modified 3 years and 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.