|
From: SourceForge.net <no...@so...> - 2008-06-30 16:16:58
|
Bugs item #1966376, was opened at 2008-05-18 10:36 Message generated for change (Comment added) made by lballabio You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1966376&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Luigi Ballabio (lballabio) Summary: Bug: isInSubset Initial Comment: Hello, the function isInSubset in ql/models/marketmodels/utilities.cpp crashes in some cases. Subset loop: while (true) { subsetElement = subset[j]; result[i] = false; if (setElement < subsetElement) break; if (setElement == subsetElement) { result[i] = true; break; } if (j > dimsubSet-1) break; ++j; } The largest allowed j in the line with the break is j==dimsubSet-1. In the next line j is increased by 1 and we have j==dimsubSet. The next statement at the beginning of the while-loop will exceed the array-boundary: subsetElement = subset[j]. I think a greater or equal would be a solution: if (j >= dimsubSet-1) break; Kind regards Jan van Heys email: ml...@va... ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2008-06-30 18:16 Message: Logged In: YES user_id=75450 Originator: NO The bug is now fixed in the Subversion repository. Thank you for the report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1966376&group_id=12740 |