vlc/vlc-3.0 | branch: master | Steve Lhomme <[email protected]> | Mon Jan 7 11:59:05 2019 +0100| [8aac9c85ba3089a81663da1b11f7c6a758be843e] | committer: Steve Lhomme
picture: align the buffer size to 64 Otherwise aligned_alloc() may fail. It's OK to allocate more to preserve the alignment. Fixes #21647 > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=8aac9c85ba3089a81663da1b11f7c6a758be843e --- src/misc/picture.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/misc/picture.c b/src/misc/picture.c index 33e9242e70..e03f9d5923 100644 --- a/src/misc/picture.c +++ b/src/misc/picture.c @@ -70,6 +70,7 @@ static int AllocatePicture( picture_t *p_pic ) return VLC_ENOMEM; } + i_bytes = (i_bytes + 63) & ~63; /* must be a multiple of 64 */ uint8_t *p_data = aligned_alloc( 64, i_bytes ); if( i_bytes > 0 && p_data == NULL ) { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
