[vlc-commits] picture: remove redundant test
Rémi Denis-Courmont
git at videolan.org
Sun Feb 11 09:17:10 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 10 20:59:45 2018 +0200| [8e1ac9182460717a509ec17754abbd6e03e0b5b1] | committer: Rémi Denis-Courmont
picture: remove redundant test
picture_Setup() now catches conversions of large to negative earlier.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8e1ac9182460717a509ec17754abbd6e03e0b5b1
---
src/misc/picture.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/misc/picture.c b/src/misc/picture.c
index 490b4a8300..678ab7b535 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -56,8 +56,7 @@ static int AllocatePicture( picture_t *p_pic )
{
const plane_t *p = &p_pic->p[i];
- if( p->i_pitch < 0 || p->i_lines <= 0 ||
- (size_t)p->i_pitch > (SIZE_MAX - i_bytes)/p->i_lines )
+ if( (size_t)p->i_pitch > (SIZE_MAX - i_bytes)/p->i_lines )
return VLC_ENOMEM;
i_bytes += p->i_pitch * p->i_lines;
}
More information about the vlc-commits
mailing list