Forráskód Böngészése

!!! reading out of buffer if prebuilt atlas too big

dmuratshin 9 éve
szülő
commit
6631fea15e
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      oxygine/src/res/ResAtlasPrebuilt.cpp

+ 1 - 1
oxygine/src/res/ResAtlasPrebuilt.cpp

@@ -30,7 +30,7 @@ namespace oxygine
             int len = meta_alpha.attribute("len").as_int();
             base64_decodestate state;
             base64_init_decodestate(&state);
-            _hitTestBuffer.resize(len * 3 / 4);
+            _hitTestBuffer.resize(len * 3 / 4 + 1);
             if (len)
                 base64_decode_block(data, len, (char*)&_hitTestBuffer.front(), &state);
         }