`get_options()` repeats the first byte when hex-encoding octet strings
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 85/100
Hướng nghiên cứu
Trong scheduler/job.c, kiểm tra vòng lặp xuất hệ thập lục phân trong get_options() và so sánh cách nhánh chuỗi có dấu ngoặc kép liền kề tăng con trỏ đầu vào. Thay đổi vòng lặp để nó xuất hai chữ số thập lục phân cho mỗi byte đầu vào theo đúng thứ tự; hoàn tất khi 41 0A 42 được mã hóa thành 410A42 thay vì 414141. Issue không nêu tên bài kiểm thử, vì vậy hãy tìm một bài kiểm thử hiện có kiểm tra việc mã hóa tùy chọn của bộ lọc in.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In scheduler/job.c, the hexadecimal branch of get_options() advances the output pointer but not the input pointer. Each iteration formats *valptr, so a multi-byte octet string that takes this branch is serialized as repetitions of its first byte. Print filters receive a different value from the one supplied.
Expected: Emit two hexadecimal digits for each input byte, in order.
Actual: The first byte is emitted once per input byte. For example, at the encoder level, 41 0A 42 should become <410A42> but the loop produces <414141>. This example is derived from the loop, not an end-to-end print test.
Suggested fix: Advance valptr once per iteration in the hex output loop, as the neighboring quoted-string branch already does.
The hex output loop was introduced in commit 5483fd294, which addressed Apple CUPS issue #5558. That issue concerned handling length-delimited octet strings, not this repeated-byte defect. The later octet-string scan fix advances the pointer while deciding whether to hex-encode, but does not change the hex output loop.
- Ngôn ngữ chính
- C
- Star
- 1.8k
- Fork
- 367
- Merge trung bình
- 12 giờ 18 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenPrinting/cups
-
cupsd crashes in _ppdCreateFromIPP2() when a printer reports a media size with no PPD name (e.g. jpn_chou2)Có thể đã có người làm @michaelrsweet đã nhận 3 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenPrinting/cups#1828 · 8 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NULL pointer dereference in `print_job()` during MIME auto-detectionCó thể đã có người làm @michaelrsweet đã nhận 3 ngày trước. Đang mởnot a bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OpenPrinting/cups#1826 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OAuth (bearer) quota check denies every user when the allowed-user list is emptyCó thể đã có người làm @RonitMehta08 đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
OpenPrinting/cups#1795 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cupsdGetPrivateAttrs: @ACL never grants access, and @OWNER is looked up as an operating-system group for non-ownersCó thể đã có người làm @user-Param đã nhận 14 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
OpenPrinting/cups#1796 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OAuth/OIDC token-validation gaps: nonce not enforced when absent, at_hash alg, inbound bearer not signature/aud/exp-validated + unverified email used for authzCó thể làm lại được @michaelrsweet đã nhận 152 ngày trước và không có pull request nào đang mở. Đang mởinvestigating
OpenPrinting/cups#1609 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của OpenPrinting/cups
Issue tương tự
-
bug severity: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AlessandroSangiuliano/Uros#1014 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
OpenXiangShan/NEMU#1314 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
micropython/micropython#20020 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
macro typo in readmeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100