From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70082 invoked by alias); 13 Oct 2018 14:36:03 -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 69638 invoked by uid 89); 13 Oct 2018 14:36:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-123.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 13 Oct 2018 14:36:00 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MSI6i-1g4qlJ3syW-00Sgx7 for ; Sat, 13 Oct 2018 16:35:57 +0200 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MSI6i-1g4qlJ3syW-00Sgx7 for ; Sat, 13 Oct 2018 16:35:57 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 96C31A80464; Sat, 13 Oct 2018 16:35:56 +0200 (CEST) Date: Sat, 13 Oct 2018 14:36:00 -0000 From: Corinna Vinschen To: cygwin-apps@cygwin.com Subject: Re: [PATCH setup] Avoid stringop-overflow warning with gcc8 Message-ID: <20181013143556.GH7872@calimero.vinschen.de> Reply-To: cygwin-apps@cygwin.com Mail-Followup-To: cygwin-apps@cygwin.com References: <20181012154349.46104-1-jon.turney@dronecode.org.uk> <20181012155839.GG7872@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iAL9S67WQOXgEPD9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-10/txt/msg00027.txt.bz2 --iAL9S67WQOXgEPD9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 961 On Oct 13 13:50, Jon Turney wrote: > On 12/10/2018 16:58, Corinna Vinschen wrote: > > On Oct 12 16:43, Jon Turney wrote: > [...] > > > diff --git a/desktop.cc b/desktop.cc > > > index 927c02f..d003e91 100644 > > > --- a/desktop.cc > > > +++ b/desktop.cc > > > @@ -107,7 +107,8 @@ start_menu (const std::string& title, const std::= string& target, > > > issystem ? CSIDL_COMMON_PROGRAMS : > > > CSIDL_PROGRAMS, &id); > > > SHGetPathFromIDList (id, path); > > > - strncat (path, "/Cygwin", MAX_PATH); > > > + strncat (path, "/Cygwin", MAX_PATH - strlen(path)); > >=20 > > Shouldn't that be > >=20 > > strncat (path, "/Cygwin", MAX_PATH - strlen(path) - 1); > >=20 > > ? >=20 > Yes! I have no idea what I was thinking! Better than the crime I have commited originally... Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --iAL9S67WQOXgEPD9 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlvCAswACgkQ9TYGna5E T6D4iw//dA2UuoxWCcZta3NvYq0xiHT6c7hQBy/CPHiLtBLF40UkHb65pUgnj7Lw 3ziRdQImjNPXKC3ohf+2HaHQdjIbDXm2gHeahJUUHW62uttzDfXLEGoxeI3PPhV1 SROV9rle4JHKRViUIyzjYIKLfkvi3A1Z0gi1uekbjNBRKv2f38wIwJKkL/x9eNKL 34Z0VCSFZshkEHhPbwDwEJPx71gSOLDIyTchs4mAgrs3I75qnVmAz2Q/MqZN9eWj oNyOZPQtAJ4Y0JdUqCBkbBFQHVQLG6dwOYzuwoc8mNbOu3dEmw0lqBNSMz2mqPfi AsvZiu1hCl5Mfx4rQv4Vgfm8wJ0U5nJ5z7l+wczQJkq9bO4ZnZovfaczA0NjxAGO 0RdsdCsj8WOCgsLsvxyyWOfz5/cl2Tx1+WI/l/nqX4yXecdiXyktLP7HEGV7thn9 b+XP+O/gCLGB4a6XwqF7lztcU0aSY8/HdFJOKNaKnQVKiXcTVroB4BBW544p8wJo styWDLrXKkiNxbUi3U+QnIBnOaOi5EhczyzkHsj1LWM0at2+lNkYW5tcfnuYmOvA UDi5DcfHGu41FbjYcjfvWdFH5tHUVA+chLRg1QpID8VWOasoSOe7WBPtKYou1Wkx e+yHLlgG71hbSfSgts5Krgy93du26Bw0Xk2tb0QmgOS0OMCm/iY= =GkjW -----END PGP SIGNATURE----- --iAL9S67WQOXgEPD9--