History

avfilter/vf_v360: fix possible out of range values

Paul B Mahol committed 6 years ago

Commit 3a035a81 parent eaba6ce1 file · +3 −3Browse files

Unified · Split

libavfilter/vf_v360.c+3−3
@@ -763,12 +763,12 @@ static inline int mod(int a, int b) · 762 unmodified lines
763static inline int reflecty(int y, int h)763static inline int reflecty(int y, int h)
764{764{
765 if (y < 0) {765 if (y < 0) {
766 return -y;766 y = -y;
767 } else if (y >= h) {767 } else if (y >= h) {
768 return 2 * h - 1 - y;768 y = 2 * h - 1 - y;
769 }769 }
770 770
771 return y;771 return av_clip(y, 0, h - 1);
772}772}
773 773
774/**774/**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t