`get_options()` repeats the first byte when hex-encoding octet strings
维护者通常 1 天内回复
评估
调研方向
在 scheduler/job.c 中检查 get_options() 里的十六进制输出循环,并比较相邻的带引号字符串分支如何推进输入指针。修改循环,使其按顺序为每个输入字节输出两位十六进制数字;当 41 0A 42 编码为 410A42 而不是 414141 时,即为完成。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 分钟
- 30 天内合并 PR
- 5
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 天前认领,目前没有进行中的 PR。 未关闭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 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100