add an extra assert to check memory bounds

-> will remove a static-analysis warning about unused value.
addresses issue #138

Change-Id: I8ba4bf71a41e32759da41907aab73108dd230bc4
This commit is contained in:
skal 2013-01-22 13:38:58 +01:00
parent 8189feda50
commit cd22f655e8

View File

@ -494,6 +494,7 @@ static int AllocateMemory(VP8Decoder* const dec) {
// alpha plane // alpha plane
dec->alpha_plane_ = alpha_size ? (uint8_t*)mem : NULL; dec->alpha_plane_ = alpha_size ? (uint8_t*)mem : NULL;
mem += alpha_size; mem += alpha_size;
assert(mem <= (uint8_t*)dec->mem_ + dec->mem_size_);
// note: left-info is initialized once for all. // note: left-info is initialized once for all.
memset(dec->mb_info_ - 1, 0, mb_info_size); memset(dec->mb_info_ - 1, 0, mb_info_size);