avcodec/rv34: Simplify and factor get_slice_offset() code
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 24 Feb 2017 11:46:28 +0000 (12:46 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 24 Feb 2017 13:12:12 +0000 (14:12 +0100)
commit8696f254444c2ec24daa570f26feadbd3df911e4
tree7ea13a789f54ea67ce465e4c55007ffbdfe9c641
parent178cd50c47aa5b7db03f7ce7a3f2934857dbd35b
avcodec/rv34: Simplify and factor get_slice_offset() code

This also fixes several integer overflows by checking each value before
use.
Fixes: 662/clusterfuzz-testcase-4898131432964096

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/rv34.c