This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH] Found a potential setup.exe problem while working on cygcheck
- To: <cygwin-apps at cygwin dot com>
- Subject: Re: [PATCH] Found a potential setup.exe problem while working on cygcheck
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- Date: Mon, 12 Nov 2001 09:30:56 +1100
- References: <20011111060349.GA23640@redhat.com>
----- Original Message -----
From: "Christopher Faylor" <firstname.lastname@example.org>
Sent: Sunday, November 11, 2001 5:03 PM
Subject: [PATCH] Found a potential setup.exe problem while working on
> Here's YA reason for a unified library. I found a problem while
> on cygcheck. AFAICT, my code was correct but gcc was miscompiling it,
> ending up with a value of 'p' which was not a pointer.
> The code below fixes that problem.
> Does this look ok? It seems to do the right thing in cygcheck.
Sure, but I think I've found the bug...
> if (!f.what)
> p = strchr (ver, '\0');
> strcpy (f.pkgtar, in_fn);
> if ((p -= 4) >= ver && strcasecmp (p, "-src") == 0)
> strcpy (f.what, "src");
> *p = '\0';
> p = f.pkgtar + (p - fn) + 4;
(- fn) is a constant, as fn is a local variable. This seems wrong to
me, as p is set relative to f.