This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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....
Attachment:
postinstall-bugfix.diff
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |