GNU bug report logs -
#42113
28.0.50; Segmentation fault in json-parse-file
Previous Next
Reported by: Erik Hetzner <egh <at> e6h.org>
Date: Sun, 28 Jun 2020 21:53:01 UTC
Severity: normal
Found in version 28.0.50
Done: Philipp Stephani <p.stephani2 <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Philipp Stephani <p.stephani2 <at> gmail.com>
> Date: Mon, 29 Jun 2020 12:07:33 +0200
> Cc: bug-gnu-emacs <at> gnu.org, Erik Hetzner <egh <at> e6h.org>, 42113 <at> debbugs.gnu.org
>
> > > The JSON functions are missing CHECK_STRING in several places where
> > > json_encode is called.
> >
> > In this specific case I think the test is there, but it is done a bit too late. The call to check_string_without_embedded_nuls should be moved before json_encode.
>
> Is that always guaranteed to be correct though? Is there a guarantee
> that encoding can never produce null bytes that weren't already
> present in the input?
It is true that you could in principle write a coding-system that
would produce null bytes (although it wouldn't be very useful). But
in this case we are not talking about any arbitrary coding-system, we
are talking specifically about UTF-8.
This bug report was last modified 5 years and 14 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.