Match in-memory structure fields without writing temporary files

Đang mở
#3,840 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
74/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend, performance

Hướng nghiên cứu

Start with polyfile/structmatcher.py at line 62 and polyfile/polyfile.py at line 329 to trace how fields reach the existing byte matcher and how path and memory inputs are handled. Compare the match tree, byte offsets, limits, and detected embedded formats for both input types; done means they stay consistent while matching in-memory fields without temporary files.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

PolyFileStruct.match writes each nonconstant byte field to disk before passing it to a matcher that already accepts bytes. Recursively analyzing archives with many fields incurs one temporary-file lifecycle per field. The separate ZIP-reader lifetime defect is tracked in #3846.

Acceptance. Feed an in-memory field to the existing matcher without the temporary-file round trip. Verify that the match tree, byte offsets, limits, and detected embedded formats stay consistent for path and memory inputs. This optimization can follow 1.0.

polyfile/structmatcher.py:62 · polyfile/polyfile.py:329

Ngôn ngữ chính
Python
Star
394
Fork
34
Merge trung bình
14 giờ 46 phút
Pull request đã merge (30 ngày)
130

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của trailofbits/polyfile

Tất cả issue của trailofbits/polyfile

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.