public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Subject: Re: [PATCH setup] Don't write garbage into the "extrakeys" user setting
Date: Mon, 27 Nov 2017 22:26:00 -0000	[thread overview]
Message-ID: <0f8a1d4d-75e4-501f-69b6-dd619c1e3681@dronecode.org.uk> (raw)
In-Reply-To: <20171127213547.10816-1-kbrown@cornell.edu>

On 27/11/2017 21:35, Ken Brown wrote:
> The ExtraKeysSetting destructor called UserSettings::set() on a string
> that was terminated by LF instead of NUL.  This led to garbage at the

What...?!?

> /*
>  * It stores them all in a contiguous memory buffer.  Each is one line of
>  * ASCII text terminated by LF.  THERE IS NO NUL-TERMINATION HERE, TAKE CARE!
>  */

Awesome... :)

> end of the "extrakeys" setting that was written into setup.rc.  Fix
> this by replacing the final LF by NUL before calling set().

Thanks for tracking this down.  Please apply.

      parent reply	other threads:[~2017-11-27 22:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 21:36 Ken Brown
2017-11-27 22:20 ` Ken Brown
2017-11-28  2:14   ` Ken Brown
2017-11-28 12:58     ` Ken Brown
2017-11-28 13:59       ` Ken Brown
2017-11-27 22:26 ` Jon Turney [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=0f8a1d4d-75e4-501f-69b6-dd619c1e3681@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-apps@cygwin.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).