Merge branch 'master' into dev

This commit is contained in:
DRC
2017-12-16 09:34:28 -06:00
5 changed files with 24 additions and 9 deletions

View File

@@ -535,7 +535,10 @@ needs.
# It should not be necessary to modify the rest # It should not be necessary to modify the rest
HOST=arm-linux-androideabi HOST=arm-linux-androideabi
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-arm SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-arm
export CFLAGS="-march=armv7-a -mfloat-abi=softfp -fprefetch-loop-arrays --sysroot=${SYSROOT}" export CFLAGS="-march=armv7-a -mfloat-abi=softfp -fprefetch-loop-arrays \
-D__ANDROID_API__=${ANDROID_VERSION} --sysroot=${SYSROOT} \
-isystem ${NDK_PATH}/sysroot/usr/include \
-isystem ${NDK_PATH}/sysroot/usr/include/${HOST}"
export LDFLAGS=-pie export LDFLAGS=-pie
TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM} TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
@@ -570,7 +573,9 @@ needs.
# It should not be necessary to modify the rest # It should not be necessary to modify the rest
HOST=aarch64-linux-android HOST=aarch64-linux-android
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-arm64 SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-arm64
export CFLAGS="--sysroot=${SYSROOT}" export CFLAGS="-D__ANDROID_API__=${ANDROID_VERSION} --sysroot=${SYSROOT} \
-isystem ${NDK_PATH}/sysroot/usr/include \
-isystem ${NDK_PATH}/sysroot/usr/include/${HOST}"
export LDFLAGS=-pie export LDFLAGS=-pie
TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM} TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
@@ -605,7 +610,9 @@ needs.
# It should not be necessary to modify the rest # It should not be necessary to modify the rest
HOST=i686-linux-android HOST=i686-linux-android
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-x86 SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-x86
export CFLAGS="--sysroot=${SYSROOT}" export CFLAGS="-D__ANDROID_API__=${ANDROID_VERSION} --sysroot=${SYSROOT} \
-isystem ${NDK_PATH}/sysroot/usr/include \
-isystem ${NDK_PATH}/sysroot/usr/include/${HOST}"
export LDFLAGS=-pie export LDFLAGS=-pie
TOOLCHAIN=${NDK_PATH}/toolchains/x86-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM} TOOLCHAIN=${NDK_PATH}/toolchains/x86-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
@@ -640,7 +647,9 @@ needs.
# It should not be necessary to modify the rest # It should not be necessary to modify the rest
HOST=x86_64-linux-android HOST=x86_64-linux-android
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-x86_64 SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-x86_64
export CFLAGS="--sysroot=${SYSROOT}" export CFLAGS="-D__ANDROID_API__=${ANDROID_VERSION} --sysroot=${SYSROOT} \
-isystem ${NDK_PATH}/sysroot/usr/include \
-isystem ${NDK_PATH}/sysroot/usr/include/${HOST}"
export LDFLAGS=-pie export LDFLAGS=-pie
TOOLCHAIN=${NDK_PATH}/toolchains/x86_64-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM} TOOLCHAIN=${NDK_PATH}/toolchains/x86_64-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}

View File

@@ -95,6 +95,12 @@ has red, green, blue, and alpha components.
TurboJPEG C API. This example mirrors the functionality of TJExample.java. TurboJPEG C API. This example mirrors the functionality of TJExample.java.
Both files are now included in the libjpeg-turbo documentation. Both files are now included in the libjpeg-turbo documentation.
10. Fixed two signed integer overflows in the arithmetic decoder, detected by
the Clang undefined behavior sanitizer, that could be triggered by attempting
to decompress a specially-crafted malformed JPEG image. These issues did not
pose a security threat, but removing the warnings makes it easier to detect
actual security issues, should they arise in the future.
1.5.3 1.5.3
===== =====

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software: * This file was part of the Independent JPEG Group's software:
* Developed 1997-2015 by Guido Vollbeding. * Developed 1997-2015 by Guido Vollbeding.
* libjpeg-turbo Modifications: * libjpeg-turbo Modifications:
* Copyright (C) 2015-2016, D. R. Commander. * Copyright (C) 2015-2017, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg * For conditions of distribution and use, see the accompanying README.ijg
* file. * file.
* *
@@ -306,7 +306,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
while (m >>= 1) while (m >>= 1)
if (arith_decode(cinfo, st)) v |= m; if (arith_decode(cinfo, st)) v |= m;
v += 1; if (sign) v = -v; v += 1; if (sign) v = -v;
entropy->last_dc_val[ci] += v; entropy->last_dc_val[ci] = (entropy->last_dc_val[ci] + v) & 0xffff;
} }
/* Scale and output the DC coefficient (assumes jpeg_natural_order[0]=0) */ /* Scale and output the DC coefficient (assumes jpeg_natural_order[0]=0) */
@@ -564,7 +564,7 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
while (m >>= 1) while (m >>= 1)
if (arith_decode(cinfo, st)) v |= m; if (arith_decode(cinfo, st)) v |= m;
v += 1; if (sign) v = -v; v += 1; if (sign) v = -v;
entropy->last_dc_val[ci] += v; entropy->last_dc_val[ci] = (entropy->last_dc_val[ci] + v) & 0xffff;
} }
if (block) if (block)