`get_options()` repeats the first byte when hex-encoding octet strings
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
scheduler/job.cで、get_options()内の16進出力ループを調べ、隣接する引用符付き文字列の分岐で入力ポインターをどのように進めているか比較してください。入力バイトごとに順番に2桁の16進数を出力するようループを変更してください。41 0A 42が414141ではなく410A42としてエンコードされれば完了です。Issueにはテストが指定されていないため、印刷フィルターのオプションエンコードを検証する既存のテストを探してください。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C
- スター
- 1.8k
- フォーク
- 367
- 平均マージ
- 12時間 18分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenPrinting/cups のほかの issue
-
cupsd crashes in _ppdCreateFromIPP2() when a printer reports a media size with no PPD name (e.g. jpn_chou2)対応中かも @michaelrsweet が 3 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenPrinting/cups#1828 · コメント 8 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
NULL pointer dereference in `print_job()` during MIME auto-detection対応中かも @michaelrsweet が 3 日前に担当しました。 オープンnot a bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OpenPrinting/cups#1826 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
OAuth (bearer) quota check denies every user when the allowed-user list is empty対応中かも @RonitMehta08 が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
OpenPrinting/cups#1795 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
cupsdGetPrivateAttrs: @ACL never grants access, and @OWNER is looked up as an operating-system group for non-owners対応中かも @user-Param が 14 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
OpenPrinting/cups#1796 ·
メンテナーはふだん 1 日以内に返信
-
OAuth/OIDC token-validation gaps: nonce not enforced when absent, at_hash alg, inbound bearer not signature/aud/exp-validated + unverified email used for authz再び着手できるかも @michaelrsweet が 152 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンinvestigating
OpenPrinting/cups#1609 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
OpenPrinting/cups の issue をすべて見る
似ている issue
-
bug severity: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AlessandroSangiuliano/Uros#1014 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
OpenXiangShan/NEMU#1314 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
micropython/micropython#20020 ·
メンテナーはふだん 1 日以内に返信
-
macro typo in readmeオープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100