This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH setup] Don't write garbage into the "extrakeys" user setting


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]