access violation for array to fix issue #949
Showing the changes to test/encoder/EncUT_GetIntraPredictor.cpp (1 of 1 file). Show all
Unified · Split
| @@ -32,9 +32,9 @@ TEST(GetIntraPredictorTest, TestGetI4x4LumaPredH) · 31 unmodified lines | |||
| 32 | const uint32_t kiStride3 = kiStride + kiStride2; | 32 | const uint32_t kiStride3 = kiStride + kiStride2; |
| 33 | 33 | ||
| 34 | uint8_t *pPred = new uint8_t[64]; | 34 | uint8_t *pPred = new uint8_t[64]; |
| 35 | uint8_t *pRef = new uint8_t[kiStride3+1]; | 35 | uint8_t *pRef = new uint8_t[kiStride3+2]; |
| 36 | 36 | ||
| 37 | for (int i=0; i<(static_cast<int32_t>(kiStride3+1)); i++) | 37 | for (int i=0; i<(static_cast<int32_t>(kiStride3+2)); i++) |
| 38 | pRef[i] = rand() % 256; | 38 | pRef[i] = rand() % 256; |
| 39 | 39 | ||
| 40 | pRef++; | 40 | pRef++; |