git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff6fa0b
)
avcodec/diracdec: fix undefined behavior with shifts
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 16 Apr 2014 00:06:37 +0000
(
02:06
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 16 Apr 2014 00:51:41 +0000
(
02:51
+0200)
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/diracdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/diracdec.c
b/libavcodec/diracdec.c
index
c72610a
..
1be4115
100644
(file)
--- a/
libavcodec/diracdec.c
+++ b/
libavcodec/diracdec.c
@@
-1355,8
+1355,8
@@
static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5],
motion_y >>= s->chroma_y_shift;
}
- mx = motion_x & ~(-1 << s->mv_precision);
- my = motion_y & ~(-1 << s->mv_precision);
+ mx = motion_x & ~(-1
U
<< s->mv_precision);
+ my = motion_y & ~(-1
U
<< s->mv_precision);
motion_x >>= s->mv_precision;
motion_y >>= s->mv_precision;
/* normalize subpel coordinates to epel */