From b455622aa84e4eb27e3887db962f59687ed0b5db Mon Sep 17 00:00:00 2001 From: Vadim Barkov Date: Thu, 19 Jan 2017 01:29:24 +0300 Subject: [PATCH] Fixed potential bug on align calculation for VSX filter_up --- powerpc/filter_vsx_intrinsics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerpc/filter_vsx_intrinsics.c b/powerpc/filter_vsx_intrinsics.c index 833f9cc44..7ebabfae2 100644 --- a/powerpc/filter_vsx_intrinsics.c +++ b/powerpc/filter_vsx_intrinsics.c @@ -36,7 +36,7 @@ void png_read_filter_row_up_vsx(png_row_infop row_info, png_bytep row, png_const_bytep prev_row) { png_size_t i; - png_size_t unaligned_top = (png_size_t)row % 16; + png_size_t unaligned_top = 16 - ((png_size_t)row % 16); png_size_t istop = row_info->rowbytes - unaligned_top; png_bytep rp = row; png_const_bytep pp = prev_row;