Skip to content

Commit

Permalink
Merge branch 'master' into legacy-zip
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Hennick <[email protected]>
  • Loading branch information
Pr0methean authored Jan 10, 2025
2 parents e581456 + e074e09 commit c323dc9
Show file tree
Hide file tree
Showing 7,698 changed files with 2,034 additions and 2,291 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
212 changes: 160 additions & 52 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,28 @@ jobs:
override: true
components: rustfmt
- name: fmt
run: cargo fmt --all -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

check_minimal_versions:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: resolve minimal versions
run: cargo -Z minimal-versions update
- name: check
run: cargo check --all-features
- name: test
run: cargo test --all-features

style_and_docs:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
Expand Down Expand Up @@ -105,38 +126,61 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
- name: Install afl
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
args: cargo-afl
- name: cargo afl system-config
uses: actions-rs/cargo@v1
with:
command: afl
args: system-config
- name: compile fuzz
uses: actions-rs/cargo@v1
with:
command: fuzz
args: build --all-features fuzz_read
command: afl
args: build --all-features --manifest-path ${{ github.workspace }}/fuzz_read/Cargo.toml
- name: run fuzz
timeout-minutes: 350
timeout-minutes: 70
uses: actions-rs/cargo@v1
with:
command: afl
args: fuzz -i ${{ github.workspace }}/fuzz_read/in -o out -V 3600 -a binary -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- name: Minimize corpus
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --all-features fuzz_read -- fuzz/corpus/fuzz_read -timeout=10s -rss_limit_mb=8192 -fork=2 -runs=25000000 -max_len=1000 -max_total_time=20700 -dict=fuzz/fuzz.dict
command: afl
args: cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- name: Report coverage
uses: actions-rs/cargo@v1
with:
command: afl
args: showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- run: sudo apt install rename
- name: Rename files
run: |
rename 's/:/-/g' map/*
rename 's/:/-/g' out_cmin/*
rename 's/:/-/g' out/default/crashes/*
- name: Upload updated corpus
uses: actions/upload-artifact@v4
with:
name: fuzz_read_corpus
path: out_cmin/*
- name: Upload any failure inputs
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_read_bad_inputs
path: fuzz/artifacts/fuzz_read/crash-*
path: out/default/crashes/*
if-no-files-found: ignore
- name: Minimize seed corpus
if: always()
run: ./recursive-fuzz-cmin.sh read 70000
shell: bash
- name: Upload updated seed corpus
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_read_corpus
path: fuzz/corpus/fuzz_read/*
name: fuzz_read_coverage
path: map

fuzz_read_with_no_features:
runs-on: ubuntu-latest
Expand All @@ -151,28 +195,50 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
- name: Install afl
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
args: cargo-afl
- name: cargo afl system-config
uses: actions-rs/cargo@v1
with:
command: afl
args: system-config
- name: compile fuzz
uses: actions-rs/cargo@v1
with:
command: fuzz
args: build --no-default-features fuzz_read
command: afl
args: build --manifest-path ${{ github.workspace }}/fuzz_read/Cargo.toml
- name: run fuzz
timeout-minutes: 350
timeout-minutes: 70
uses: actions-rs/cargo@v1
with:
command: afl
args: fuzz -i ${{ github.workspace }}/fuzz_read/in -o out -V 3600 -a binary -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- name: Report coverage
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --no-default-features fuzz_read fuzz/corpus/fuzz_read -- -rss_limit_mb=8192 -timeout=10s -fork=2 -runs=40000000 -max_total_time=20700 -max_len=70000 -dict=fuzz/fuzz.dict
command: afl
args: showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
- run: sudo apt install rename
- name: Rename files
run: |
rename 's/:/-/g' map/*
rename 's/:/-/g' out/default/crashes/*
- name: Upload any failure inputs
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_read_no_features_bad_inputs
path: fuzz/artifacts/fuzz_read/crash-*
name: fuzz_read_bad_inputs_no_features
path: out/default/crashes/*
if-no-files-found: ignore
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_read_coverage_no_features
path: map

fuzz_write:
runs-on: ubuntu-latest
Expand All @@ -187,41 +253,61 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
- name: Install afl
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
args: cargo-afl
- name: cargo afl system-config
uses: actions-rs/cargo@v1
with:
command: afl
args: system-config
- name: compile fuzz
uses: actions-rs/cargo@v1
with:
command: fuzz
args: build --all-features fuzz_write
command: afl
args: build --all-features --manifest-path ${{ github.workspace }}/fuzz_write/Cargo.toml
- name: run fuzz
timeout-minutes: 350
timeout-minutes: 70
uses: actions-rs/cargo@v1
with:
command: afl
args: fuzz -i ${{ github.workspace }}/fuzz_write/in -o out -V 3600 -a binary -x ${{ github.workspace }}/fuzz_write/fuzz.dict -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- name: Minimize corpus
uses: actions-rs/cargo@v1
with:
command: afl
args: cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- name: Report coverage
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --all-features fuzz_write fuzz/corpus/fuzz_write -- -rss_limit_mb=8192 -timeout=2s -fork=2 -runs=5000000 -max_len=160 -max_total_time=20700 -dict=fuzz/fuzz.dict
command: afl
args: showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- run: sudo apt install rename
- name: Rename files
run: |
rename 's/:/-/g' map/*
rename 's/:/-/g' out_cmin/*
rename 's/:/-/g' out/default/crashes/*
- name: Upload updated corpus
uses: actions/upload-artifact@v4
with:
name: fuzz_write_corpus
path: out_cmin/*
- name: Upload any failure inputs
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_write_bad_inputs
path: |
fuzz/artifacts/fuzz_write/crash-*
fuzz/artifacts/fuzz_write/leak-*
fuzz/artifacts/fuzz_write/timeout-*
path: out/default/crashes/*
if-no-files-found: ignore
- name: Minimize seed corpus
if: always()
run: ./recursive-fuzz-cmin.sh write 500
shell: bash
- name: Upload updated seed corpus
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_write_corpus
path: fuzz/corpus/fuzz_write/*
name: fuzz_write_coverage
path: map

fuzz_write_with_no_features:
runs-on: ubuntu-latest
Expand All @@ -236,25 +322,47 @@ jobs:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
- name: Install afl
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
args: cargo-afl
- name: cargo afl system-config
uses: actions-rs/cargo@v1
with:
command: afl
args: system-config
- name: compile fuzz
uses: actions-rs/cargo@v1
with:
command: fuzz
args: build --no-default-features fuzz_write
command: afl
args: build --all-features --manifest-path ${{ github.workspace }}/fuzz_write/Cargo.toml
- name: run fuzz
timeout-minutes: 350
timeout-minutes: 70
uses: actions-rs/cargo@v1
with:
command: afl
args: fuzz -i ${{ github.workspace }}/fuzz_write/in -o out -V 3600 -a binary -x ${{ github.workspace }}/fuzz_write/fuzz.dict -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- name: Report coverage
uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --no-default-features fuzz_write fuzz/corpus/fuzz_write -- -rss_limit_mb=8192 -timeout=10s -fork=2 -runs=40000000 -max_len=256 -max_total_time=20700 -dict=fuzz/fuzz.dict
command: afl
args: showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
- run: sudo apt install rename
- name: Rename files
run: |
rename 's/:/-/g' map/*
rename 's/:/-/g' out/default/crashes/*
- name: Upload any failure inputs
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_write_no_features_bad_inputs
path: fuzz/artifacts/fuzz_write/crash-*
name: fuzz_write_bad_inputs_no_features
path: out/default/crashes/*
if-no-files-found: ignore
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: fuzz_write_coverage_no_features
path: map
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ Cargo.lock
target
.DS_Store
\.idea/
/fuzz_read/out/
/fuzz_write/out/
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## [2.2.2](https://github.com/zip-rs/zip2/compare/v2.2.1...v2.2.2) - 2024-12-16

### <!-- 1 -->πŸ› Bug Fixes

- rewrite the EOCD/EOCD64 detection to fix extreme performance regression (#247)

## [2.2.1](https://github.com/zip-rs/zip2/compare/v2.2.0...v2.2.1) - 2024-11-20

### <!-- 1 -->πŸ› Bug Fixes

- remove executable bit ([#238](https://github.com/zip-rs/zip2/pull/238))
- *(lzma)* fixed panic in case of invalid lzma stream ([#259](https://github.com/zip-rs/zip2/pull/259))
- resolve new clippy warnings on nightly ([#262](https://github.com/zip-rs/zip2/pull/262))
- resolve clippy warning in nightly ([#252](https://github.com/zip-rs/zip2/pull/252))

### <!-- 4 -->⚑ Performance

- Faster cde rejection ([#255](https://github.com/zip-rs/zip2/pull/255))

## [2.2.0](https://github.com/zip-rs/zip2/compare/v2.1.6...v2.2.0) - 2024-08-11

### <!-- 0 -->πŸš€ Features
- Expose `ZipArchive::central_directory_start` ([#232](https://github.com/zip-rs/zip2/pull/232))

## [2.1.6](https://github.com/zip-rs/zip2/compare/v2.1.5...v2.1.6) - 2024-07-29

### <!-- 1 -->πŸ› Bug Fixes
- ([#33](https://github.com/zip-rs/zip2/pull/33)) Rare combination of settings could lead to writing a corrupt archive with overlength extra data, and data_start locations when reading the archive back were also wrong ([#221](https://github.com/zip-rs/zip2/pull/221))

### <!-- 2 -->🚜 Refactor
- Eliminate some magic numbers and unnecessary path prefixes ([#225](https://github.com/zip-rs/zip2/pull/225))

## [2.1.5](https://github.com/zip-rs/zip2/compare/v2.1.4...v2.1.5) - 2024-07-20

### <!-- 2 -->🚜 Refactor
Expand Down
Loading

0 comments on commit c323dc9

Please sign in to comment.