This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH setup] Don't write garbage into the "extrakeys" user setting
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Date: Mon, 27 Nov 2017 22:25:53 +0000
- Subject: Re: [PATCH setup] Don't write garbage into the "extrakeys" user setting
- Authentication-results: sourceware.org; auth=none
- References: <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.