From 7ca745a2df23d81eb53ad30fb04d8becde1c6006 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Mon, 16 Mar 2015 16:47:38 -0700 Subject: [PATCH] palette: Fix an illegal read Change-Id: I71649f0a85d98b96efd08c8a9e3ee7372fd7d327 --- vp9/common/vp9_palette.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp9/common/vp9_palette.c b/vp9/common/vp9_palette.c index 24996843f..e303619ab 100644 --- a/vp9/common/vp9_palette.c +++ b/vp9/common/vp9_palette.c @@ -71,7 +71,7 @@ int run_lengh_encoding(uint8_t *seq, int n, uint16_t *runs, int max_run) { runs[l++] = symbol; this_run = 1; i++; - while (seq[i] == symbol && i < n) { + while (i < n && seq[i] == symbol) { i++; this_run++; }