From cd22f655e8fcf1308f5003e64d59b4c6e0925534 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 22 Jan 2013 13:38:58 +0100 Subject: [PATCH] add an extra assert to check memory bounds -> will remove a static-analysis warning about unused value. addresses issue #138 Change-Id: I8ba4bf71a41e32759da41907aab73108dd230bc4 --- src/dec/frame.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dec/frame.c b/src/dec/frame.c index 2e7964ad..911c7ffc 100644 --- a/src/dec/frame.c +++ b/src/dec/frame.c @@ -494,6 +494,7 @@ static int AllocateMemory(VP8Decoder* const dec) { // alpha plane dec->alpha_plane_ = alpha_size ? (uint8_t*)mem : NULL; mem += alpha_size; + assert(mem <= (uint8_t*)dec->mem_ + dec->mem_size_); // note: left-info is initialized once for all. memset(dec->mb_info_ - 1, 0, mb_info_size);