From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42081 invoked by alias); 27 Nov 2017 22:26:00 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 42056 invoked by uid 89); 27 Nov 2017 22:26:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=CARE, THERE, TAKE, HERE X-HELO: out4-smtp.messagingengine.com Received: from out4-smtp.messagingengine.com (HELO out4-smtp.messagingengine.com) (66.111.4.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Nov 2017 22:25:58 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8326B20E2B for ; Mon, 27 Nov 2017 17:25:56 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Mon, 27 Nov 2017 17:25:56 -0500 X-ME-Sender: Received: from [192.168.1.102] (host86-158-32-25.range86-158.btcentralplus.com [86.158.32.25]) by mail.messagingengine.com (Postfix) with ESMTPA id 3DFFC7E56F for ; Mon, 27 Nov 2017 17:25:56 -0500 (EST) Subject: Re: [PATCH setup] Don't write garbage into the "extrakeys" user setting To: cygwin-apps@cygwin.com References: <20171127213547.10816-1-kbrown@cornell.edu> From: Jon Turney Message-ID: <0f8a1d4d-75e4-501f-69b6-dd619c1e3681@dronecode.org.uk> Date: Mon, 27 Nov 2017 22:26:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171127213547.10816-1-kbrown@cornell.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-11/txt/msg00116.txt.bz2 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.