Message ID | 20201029123935.356951-1-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 11ea0ed20e11dd1b19af6e23eceabce7ec76f70d |
Headers | show |
Series | [FFmpeg-devel] avformat/jacosubdec: Fix unintended fallthrough | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On Thu, Oct 29, 2020 at 01:39:35PM +0100, Andreas Rheinhardt wrote: > Regression since 715ff75e5dbbbefff7337351db596a9b7a5d4379. > > Fixes Coverity issues #1468654 and #1468656. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavformat/jacosubdec.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) LGTM thx [...]
diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c index e70ceeaafd..14221b166c 100644 --- a/libavformat/jacosubdec.c +++ b/libavformat/jacosubdec.c @@ -148,9 +148,15 @@ static int get_shift(int timeres, const char *buf) ret = 0; switch (n) { - case 4: ret = sign * (((int64_t)a*3600 + b*60 + c) * timeres + d); - case 3: ret = sign * (( (int64_t)a*60 + b) * timeres + c); - case 2: ret = sign * (( (int64_t)a) * timeres + b); + case 4: + ret = sign * (((int64_t)a*3600 + b*60 + c) * timeres + d); + break; + case 3: + ret = sign * (( (int64_t)a*60 + b) * timeres + c); + break; + case 2: + ret = sign * (( (int64_t)a) * timeres + b); + break; } if ((int)ret != ret) ret = 0;
Regression since 715ff75e5dbbbefff7337351db596a9b7a5d4379. Fixes Coverity issues #1468654 and #1468656. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/jacosubdec.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)