[PATCH] Found a potential setup.exe problem while working on cygcheck
Robert Collins
robert.collins@itdomain.com.au
Thu Nov 1 23:09:00 GMT 2001
----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
To: <cygwin-apps@cygwin.com>
Sent: Sunday, November 11, 2001 5:03 PM
Subject: [PATCH] Found a potential setup.exe problem while working on
cygcheck
> Here's YA reason for a unified library. I found a problem while
working
> 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...
> cgf
>
>
> if (!f.what[0])
> {
> 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.
Rob
More information about the Cygwin-apps
mailing list