From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] [PATCH] libjson: make sure string contains only a single JSON value
Date: Mon, 18 Sep 2023 08:59:10 -0400 [thread overview]
Message-ID: <E14EA4CE8D992ABBEDB637953EF89F50@eigenstate.org> (raw)
In-Reply-To: <CAAJ3RaMYfxOZ4dxMuke+11LPUVL5Ak6gZuqifzWmZQOGs1bWpw@mail.gmail.com>
Quoth Kristo <kristo.ilmari@gmail.com>:
> diff bf645afaac246967b9590ae7463f243c11d97480 uncommitted
> --- a/sys/src/libjson/json.c
> +++ b/sys/src/libjson/json.c
> @@ -328,6 +328,13 @@
>
> j = jsonobj(&l);
> free(l.buf);
> +
> + if(peeknonspace(&l) != 0){
> + jsonfree(j);
> + werrstr("json: unexpected trailing data");
> + return nil;
> + }
> +
> return j;
> }
thanks, committed.
prev parent reply other threads:[~2023-09-18 13:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 15:29 Kristo
2023-08-07 22:16 ` ori
2023-08-08 14:44 ` [9front] " Kristo
2023-09-18 11:26 ` Kristo
2023-09-18 12:59 ` ori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E14EA4CE8D992ABBEDB637953EF89F50@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).