shithub: openh264

Download patch

ref: 24553c2e4aea5a3542093a1716c2022a37239ac9
parent: 9f822f1391347a29de1284b18dfff0c396a30d8c
author: huili2 <[email protected]>
date: Tue Jun 10 18:28:30 EDT 2014

access violation for array

--- a/test/encoder/EncUT_GetIntraPredictor.cpp
+++ b/test/encoder/EncUT_GetIntraPredictor.cpp
@@ -32,9 +32,9 @@
   const uint32_t kiStride3 = kiStride + kiStride2;
 
   uint8_t *pPred = new uint8_t[64];
-  uint8_t *pRef  = new uint8_t[kiStride3+1];
+  uint8_t *pRef  = new uint8_t[kiStride3+2];
 
-  for (int i=0; i<(static_cast<int32_t>(kiStride3+1)); i++)
+  for (int i=0; i<(static_cast<int32_t>(kiStride3+2)); i++)
     pRef[i] = rand() % 256;
 
   pRef++;