Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Handle<YieldTermStructure> md0Yts() {
- ....
- double q6mh[] = {
- 0.0001,0.0001,0.0001,0.0003,0.00055,0.0009,0.0014,0.0019,
- 0.0025,0.0031,0.00325,0.00313,0.0031,0.00307,0.00309,
- 0.00339,0.00316,0.00326,0.00335,0.00343,0.00358,0.00351,
- 0.00388,0.00404,0.00425,0.00442,0.00462,0.00386,0.00491,
- 0.00647,0.00837,0.01033,0.01218,0.01382,0.01527,0.01654,
- 0.0177,0.01872,0.01959,0.0203,0.02088,0.02132,0.02164,
- 0.02186,0.02202,0.02213,0.02222,0.02229,0.02234,0.02238,
- 0.02241,0.02243,0.02244,0.02245,0.02247,0.0225,0.02284,
- 0.02336,0.02407,0.0245 };
- ....
- for(int i=0;i<10+18+37;i++) {
- q6m.push_back(
- boost::shared_ptr<Quote>(new SimpleQuote(q6mh[i])));
- }
- ....
- }
- This suspicious code was found in QuantLib project by PVS-Studio static code analyzer.
- Warning message is:
- V557 Array overrun is possible. The value of 'i' index could reach 64. markovfunctional.cpp 176
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment