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:message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:date; q=dns; s= default; b=STj40wy5OKgt+4Xy0bpXk5DKoRaR++P9dZiY18far3CyUmtooAkam aCHWqQG3zqKbRttzFPCCjRAgpPXgXrEq0+U3YhQTYjgXhVyt4QOeNw2Sy+vOSf97 DUORid+gV3Ms/iGBdOZzeXLWRB57YXJ+N0RogSRCL9o4o8F3OUHM1w= 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:message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:date; s=default; bh=74e+Pj2EQ8ETMIHxT18O6TBE5uQ=; b=xfCWshVVEaaKli01AOZMcmLH8yQb b21Vi7PhOABspAYhONHI6SlprFJ/beAdMlWDGN/9kXYdDOVirMYYWdEUfkf6lWPL qUDi/0pNcXgrgMQnwXWBum1N5QrNdzE3XplUr6QzHirk+XluqMADrSro9ZaljNuG K6Gz3PqHQ50hymI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-1.9 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: out4-smtp.messagingengine.com Message-Id: <1445135414.3384650.413058409.46BC94AD@webmail.messagingengine.com> From: Anthony Heading To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain Subject: mkshortcut (cygutils-1.4.14) free error Date: Sat, 17 Oct 2015 22:30:14 -0400 Seems free() is being called on an adjusted pointer, causing general misbehaviour. A minimal patch below. Anthony --- src/mkshortcut/mkshortcut.c.Orig 2015-10-17 21:57:08.000000000 -0400 +++ src/mkshortcut/mkshortcut.c 2015-10-17 22:16:41.269357400 -0400 @@ -412,7 +412,7 @@ char* exe_name = NULL; char* dir_name = NULL; char* desc = NULL; - char *buf_str, *tmp_str; + char *buf_str, *tmp_str, *base_str; int tmp; /* For OLE interface */ @@ -489,6 +489,7 @@ { /* Strip trailing /'s if any */ buf_str = xstrndup (opts.target_arg, strlen(opts.target_arg)); + base_str = buf_str; tmp_str = buf_str; tmp = strlen (buf_str) - 1; while (strrchr (buf_str, '/') == (buf_str + tmp)) @@ -504,7 +505,7 @@ buf_str++; } link_name = xstrndup (tmp_str, strlen (tmp_str)); - free (buf_str); + free (base_str); } /* User specified a name, so check it and convert */ else -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple