linebender / linebender/piet

[piet-cairo] Provide propper error for strings containing null before passing to cairo

Open
#447 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.4k
Forks
98
PR merge metrics
No merged PRs in 30d

Description

Currently creating something like a piet label containing a null byte as character will crash the program with a vague error and backtrace.

This could be improved by providing a proper error. Ideally cairo-rs should handle this, and I might end up filling an issue on them as well tomorrow.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash by creating a piet label containing a null byte, then inspect the piet-cairo path that passes the string to cairo. The work is done when this input returns a proper error instead of a vague error and backtrace; check whether cairo-rs already handles the case or requires an upstream issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.