Fix undefined behavior in decoder.

Cherry-picking https://github.com/google/brotli/commit/4278934e.
2 files changed