diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml deleted file mode 100644 index 7e2fbf28f88..00000000000 --- a/.github/workflows/cifuzz.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: CIFuzz - -on: - push: - paths: - - "**.c" - - "**.h" - pull_request: - paths: - - "**.c" - - "**.h" - workflow_dispatch: - -jobs: - Fuzzing: - runs-on: ubuntu-latest - steps: - - name: Build Fuzzers - id: build - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master - with: - oss-fuzz-project-name: 'pillow' - language: python - dry-run: false - - name: Run Fuzzers - id: run - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master - with: - oss-fuzz-project-name: 'pillow' - fuzz-seconds: 600 - language: python - dry-run: false - - name: Upload New Crash - uses: actions/upload-artifact@v2 - if: failure() && steps.build.outcome == 'success' - with: - name: artifacts - path: ./out/artifacts - - name: Upload Legacy Crash - uses: actions/upload-artifact@v2 - if: steps.run.outcome == 'success' - with: - name: crash - path: ./out/crash* - - name: Fail on legacy crash - if: success() - run: | - [ ! -e out/crash-* ] - echo No legacy crash detected diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml index 57396fddcce..6a4f980161a 100644 --- a/.github/workflows/test-docker.yml +++ b/.github/workflows/test-docker.yml @@ -10,10 +10,6 @@ jobs: fail-fast: false matrix: docker: [ - # Run slower jobs first to give them a headstart and reduce waiting time - ubuntu-20.04-focal-arm64v8, - ubuntu-20.04-focal-ppc64le, - ubuntu-20.04-focal-s390x, # Then run the remainder alpine, amazon-2-amd64, @@ -28,13 +24,6 @@ jobs: ubuntu-20.04-focal-amd64, ] dockerTag: [main] - include: - - docker: "ubuntu-20.04-focal-arm64v8" - qemu-arch: "aarch64" - - docker: "ubuntu-20.04-focal-ppc64le" - qemu-arch: "ppc64le" - - docker: "ubuntu-20.04-focal-s390x" - qemu-arch: "s390x" name: ${{ matrix.docker }} diff --git a/CHANGES.SIMD.rst b/CHANGES.SIMD.rst index aeacdb9de10..3d627354caa 100644 --- a/CHANGES.SIMD.rst +++ b/CHANGES.SIMD.rst @@ -1,6 +1,13 @@ Changelog (Pillow-SIMD) ======================= +9.0.0.post1 +----------- + +- Fixed possible overflow in LUT processing +- Restored compativlity with Visual C Compiler + + 7.0.0.post4 ----------- diff --git a/src/PIL/_version.py b/src/PIL/_version.py index 9821e344c64..01311ad9d05 100644 --- a/src/PIL/_version.py +++ b/src/PIL/_version.py @@ -1,2 +1,2 @@ # Master version for Pillow -__version__ = "9.0.0.post0" +__version__ = "9.0.0.post1" diff --git a/src/_imaging.c b/src/_imaging.c index 88af37f82af..0b39e369b08 100644 --- a/src/_imaging.c +++ b/src/_imaging.c @@ -761,7 +761,7 @@ _prepare_lut_table(PyObject *table, Py_ssize_t table_size) { } /* malloc check ok, max is 2 * 4 * 65**3 = 2197000 */ - prepared = (INT16 *)malloc(sizeof(INT16) * table_size + 2); + prepared = (INT16 *)malloc(sizeof(INT16) * (table_size + 2)); if (!prepared) { if (free_table_data) { free(table_data); diff --git a/src/libImaging/ImagingSIMD.h b/src/libImaging/ImagingSIMD.h index d082837d138..35a0fccfee5 100644 --- a/src/libImaging/ImagingSIMD.h +++ b/src/libImaging/ImagingSIMD.h @@ -1,13 +1,18 @@ +#ifndef __IMAGING_SIMD_H__ +#define __IMAGING_SIMD_H__ + /* Microsoft compiler doesn't limit intrinsics for an architecture. This macro is set only on x86 and means SSE2 and above including AVX2. */ #if defined(_M_X64) || _M_IX86_FP == 2 #define __SSE4_2__ #endif + #if defined(__SSE4_2__) #include #include #include #endif + #if defined(__AVX2__) #include #endif @@ -25,3 +30,5 @@ mm256_cvtepu8_epi32(void *ptr) { return _mm256_cvtepu8_epi32(_mm_loadl_epi64((__m128i *) ptr)); } #endif + +#endif