[PATCH] High priority bugfix for setup.exe
Dave Korn
dave.korn@artimi.com
Mon Apr 18 03:50:00 GMT 2005
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@artimi.com>
* postinstall.cc (RunFindVisitor::visitFile): Don't index off front
of string if it's too short to possibly contain ".done".
cheers,
DaveK
--
Can't think of a witty .sigline today....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postinstall-bugfix.diff
Type: application/octet-stream
Size: 734 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20050418/8629ba65/attachment.obj>
More information about the Cygwin-apps
mailing list