[PATCH] High priority bugfix for setup.exe
Igor Pechtchanski
pechtcha@cs.nyu.edu
Mon Apr 18 04:25:00 GMT 2005
On Mon, 18 Apr 2005, Dave Korn wrote:
> Heh, guess how nicely this:-
>
> virtual void visitFile(String const &basePath, const WIN32_FIND_DATA *theFile)
> {
> String fileName(theFile->cFileName);
> if (fileName.substr(fileName.size() - 5) == ".done")
> return;
>
> bit of code plays with the file /etc/postinstall/d.sh? (Hint: fileName ==
> "d.sh")
>
> The attached patch fixes the access violation that results from substr
> indexing off the front of the string. It builds and fixes the problem in
> testing.
>
>
> 2005-04-18 Dave Korn <dave.korn<at>artimi.com>
>
> * postinstall.cc (RunFindVisitor::visitFile): Don't index off front
> of string if it's too short to possibly contain ".done".
FYI: <http://cygwin.com/ml/cygwin-apps/2005-02/msg00050.html>.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postinstall-bugfix.diff
Type: application/octet-stream
Size: 734 bytes
Desc:
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20050418/5df105d6/attachment.obj>
More information about the Cygwin-apps
mailing list