[PATCH]Setup.Exe causes Application Error at 0x78001750

Michael A Chase mchase@ix.netcom.com
Tue Mar 26 02:14:00 GMT 2002


From: "Robert Collins" <robert.collins@itdomain.com.au>
To: "Pavel Tsekov" <ptsekov@gmx.net>; <cygwin-apps@cygwin.com>
Cc: "Seitz, Matt" <mseitz@snapserver.com>; <cygwin@cygwin.com>
Sent: Friday, March 22, 2002 20:33
Subject: RE: [Possible BUG and a fix] Re[2]: Setup.Exe causes Application
Error at 0x78001750


> From: Pavel Tsekov [mailto:ptsekov@gmx.net]
> Sent: Saturday, March 23, 2002 11:03 AM

>   strcpy (dp, dots);
>   delete[] dots;
>   key = String (dp);
>
> LOOK HERE - This is not right - we should delete at the base
> of the block, not somewhere in the middle of it.
>   delete[] dp;
>
> We can do something like that
> char *dp = ....
> char *dp_save = dp;
>
>  ....
>
>  delete[] dp_save;

] Huh? delete[]dp; is the last reference to dp. delete[]dots; is the last
] reference to dots. Whats the problem?

dp is modified so doesn't point to the base of the allocated area by the
time delete[] dp is called.  A separate working variable should be used
rather than modifying the allocation pointer.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Changelog:

2002-03-22  Michael A Chase <mchase@ix.netcom.com>

    * site.cc (site_list_type::init): Preserve allocation pointer for key
buffer.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cinstall-mac-020322-1.patch
Type: application/octet-stream
Size: 569 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020326/87390753/attachment.obj>


More information about the Cygwin-patches mailing list