`get_options()` repeats the first byte when hex-encoding octet strings
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 85/100
Línea de trabajo
En scheduler/job.c, inspecciona el bucle de salida hexadecimal en get_options() y compara cómo avanza su puntero de entrada la rama cercana de cadenas entre comillas. Cambia el bucle para que emita dos dígitos hexadecimales por cada byte de entrada, en orden; estará listo cuando 41 0A 42 se codifique como 410A42 en lugar de 414141. El issue no especifica ningún test, así que busca un test existente que compruebe la codificación de opciones del filtro de impresión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C
- Estrellas
- 1.8k
- Forks
- 367
- Merge medio
- 12 h 18 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenPrinting/cups
-
cupsd crashes in _ppdCreateFromIPP2() when a printer reports a media size with no PPD name (e.g. jpn_chou2)Posiblemente ocupada @michaelrsweet la tomó hace 3 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenPrinting/cups#1828 · 8 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
NULL pointer dereference in `print_job()` during MIME auto-detectionPosiblemente ocupada @michaelrsweet la tomó hace 3 días. Abiertonot a bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenPrinting/cups#1826 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
OAuth (bearer) quota check denies every user when the allowed-user list is emptyPosiblemente ocupada @RonitMehta08 la tomó hace 7 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
OpenPrinting/cups#1795 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
cupsdGetPrivateAttrs: @ACL never grants access, and @OWNER is looked up as an operating-system group for non-ownersPosiblemente ocupada @user-Param la tomó hace 14 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
OpenPrinting/cups#1796 ·
Los mantenedores suelen responder en 1 día
-
OAuth/OIDC token-validation gaps: nonce not enforced when absent, at_hash alg, inbound bearer not signature/aud/exp-validated + unverified email used for authzQuizá libre de nuevo @michaelrsweet la tomó hace 152 días y no hay ningún pull request abierto. Abiertoinvestigating
OpenPrinting/cups#1609 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de OpenPrinting/cups
Issues similares
-
bug severity: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AlessandroSangiuliano/Uros#1014 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
OpenXiangShan/NEMU#1314 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
micropython/micropython#20020 ·
Los mantenedores suelen responder en 1 día
-
macro typo in readmeAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100