delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=clSd4V/UAPF23a+nivMgJSt4c5Oy3uplQv0osZfBPLkl0lX8WwTwP | |
kmOgR3q622xSwgJTUC8QyRuTFlZr/Xr+2Rntkj3/AsiTZNb8anxnvnAZj6tMr0b7 | |
Jx9/DHHKB+3Wkse3GJ7Xh9sohC9T082jAWILaSkikJ2QGtkQtzd3YQ= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=2Wf/8ZKj39vaoBtIKybexgPkkdQ=; b=TDdqenKMqZONXADP/ZLs7naIn5as | |
EwjmbHnibwMMeQwSwCdPmYiUxBRxkN12u5k9TlWk2c9q44fLifnXkGqLRdAFWGx9 | |
3XI/U36ML8qXtzwpo5/PDthBgC3PCNKH48WPUM1fHIn8eT87BFssEkyk18cIytV6 | |
BpTnhiTZIDP95Qc= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Mon, 26 Oct 2015 11:00:02 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: mkshortcut (cygutils-1.4.14) free error |
Message-ID: | <20151026100002.GA31990@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <1445135414 DOT 3384650 DOT 413058409 DOT 46BC94AD AT webmail DOT messagingengine DOT com> <1445823930 DOT 241438 DOT 419951441 DOT 109BA262 AT webmail DOT messagingengine DOT com> <loom DOT 20151026T044455-64 AT post DOT gmane DOT org> |
MIME-Version: | 1.0 |
In-Reply-To: | <loom.20151026T044455-64@post.gmane.org> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--HcAYCG3uE/tztfnV Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Oct 26 03:57, Mark Geisert wrote: > Anthony Heading writes: > > I see the cygutils package has been orphaned, perhaps explaining the > > lack of response to the below.=20=20 > > A related question then is that the vanilla mkshortcut built from the > > latest source package does not > > seem to perfectly match the behaviour of the binary. Is there any way > > to review or reproduce how > > the binary package was built, or any other way to verify that the source > > and binaries do match? >=20 > Unfortunately I have no answers for your good questions above. But... >=20 > > On Sat, Oct 17, 2015, at 10:30 PM, Anthony Heading wrote: > > > Seems free() is being called on an adjusted pointer, causing general > > > misbehaviour. A minimal patch below. >=20 > [...sorry for deletions within the patch; trying to satisfy gmane...] > > > - char *buf_str, *tmp_str; > > > + char *buf_str, *tmp_str, *base_str; > [...] > > > buf_str =3D xstrndup (opts.target_arg, strlen(opts.target_arg)= ); > > > + base_str =3D buf_str; > > > tmp_str =3D buf_str; >=20 > ...if tmp_str is not modified after the above line, ... >=20 > > > tmp =3D strlen (buf_str) - 1; > > > while (strrchr (buf_str, '/') =3D=3D (buf_str + tmp)) > > > <at> <at> -504,7 +505,7 <at> <at>=20 > > > buf_str++; > > > } > > > link_name =3D xstrndup (tmp_str, strlen (tmp_str)); > > > - free (buf_str); > > > + free (base_str); >=20 > ...then "free(tmp_str);" should solve the original issue without having to > define a new variable base_str. I didn't look at the complete original > code, only the patch that you posted, but hopefully this points to a "more > minimal" fix if you agree it's solid. Ideally somebody takes a heart and takes over the package as maintainer :} Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWLfmhAAoJEPU2Bp2uRE+g7tYP/2GP7MldM1Tpd+vOzo3EacbQ GvxgiHunjSfutyieP35ToC7LloNPQLCwk0U8Y41/ikf5mIJ7z04aHmGD7lcvRaC/ B9JHlJKnx7zA+cWXSK/KsErA+OwAf0yUrecYeCLiYxMo5KhiKrlKaKIoCKmovCWs etgeEVQLx+NQTGMSmLfUnDCap8/RO4GimnL7Dr9K9BiTpBe75ka0TSXroWQ0Cx0o iaLCHwEcjSgswQ7cVX6WD5OqlegEHDQX25/aHMg2ULuo4zEi8YeENg+bKlKx6zFz hwyF1u21XGv3B236KoSnD1dDYcNZXm19R3beVrUWcTW6Bou7zpVH+9CIvpmDwRej 4BRXaQWV7OPGtSSad+B34ari7E2BWU7fC8PwrIDAneSBtdLbXJeFLLkw3IGVKS17 YnzREAoxLvducCU91X/Riwehe+vYzUUl9VmRaRrZTZcxr+Uk41yPdw56TNJXY/zB vaVdHo57kQxrG5QNyj4KBbaUnjyBxVDH2dmTuqy64U7iHa28KWhanZLWHnmEdAAu hFaoQQxAH7MTinj55remkAwDYnHWUfX9YisVVaDqTYlz4NXQjVtubFr2Vj5b3r/n ibgJQYvKIWNpmqZaxEWj55I9jZ2EgVZ8Go9IBAr7IAK1crfkpPS66DJ4uuFxRs/l xYDx25Z2M7dhkPvGXD0U =G9xu -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |