12
168
Fork
You've already forked fnott
32

WIP: fix segfault while parsing themes with empty Inherits field #203

Draft
cat2623 wants to merge 1 commit from cat2623/fnott:shakalnykot into master
pull from: cat2623/fnott:shakalnykot
merge into: dnkl:master
dnkl:master
dnkl:releases/1.8
dnkl:releases/1.7
dnkl:releases/1.6
dnkl:releases/1.5
dnkl:release/1.4
dnkl:parse-font-apply-fontconfig-rules
dnkl:releases/1.3
dnkl:releases/1.2
dnkl:releases/1.1
dnkl:releases/1.0
First-time contributor
Copy link

i decided to test out fnott, but short after installing it from repos of my distro i noticed that it segfaults
shortly after that with strace and a bit of debugging a build from git i found the cause.

# This file is written by nwg-look. Do not edit.
[Icon Theme]
Name=Default
Comment=Default Cursor Theme
Inherits=

theme at ~/.local/share/icons/default/index.theme, generated automatically by nwg-look, inherits... nothing?????
due to that, value as passed to strtok_r in file icon.c at line 125 is NULL

so i made a simple ad-hoc-ish check that simply skips such key

fell free to reject, i don't know anything

i decided to test out fnott, but short after installing it from repos of my distro i noticed that it segfaults shortly after that with strace and a bit of debugging a build from git i found the cause. ``` # This file is written by nwg-look. Do not edit. [Icon Theme] Name=Default Comment=Default Cursor Theme Inherits= ``` theme at `~/.local/share/icons/default/index.theme`, generated automatically by nwg-look, inherits... nothing????? due to that, value as passed to strtok_r in file icon.c at line 125 is NULL so i made a simple ad-hoc-ish check that simply skips such key fell free to reject, i don't know anything
ad-hoc solution to segfault while parsing themes
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending approval
builds.sr.ht/alpine-x64 Job completed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline is pending approval
builds.sr.ht/freebsd-x64 Job completed
0a4c1bafe4
cat2623 changed title from (削除) WIP: ad-hoc solution to segfault while parsing themes (削除ここまで) to WIP: fix segfault while parsing themes 2025年11月24日 15:55:31 +01:00
cat2623 changed title from (削除) WIP: fix segfault while parsing themes (削除ここまで) to WIP: fix segfault while parsing themes with empty inherits field 2025年11月24日 15:55:58 +01:00
cat2623 changed title from (削除) WIP: fix segfault while parsing themes with empty inherits field (削除ここまで) to WIP: fix segfault while parsing themes with empty Inherits field 2025年11月24日 15:56:05 +01:00
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending approval
builds.sr.ht/alpine-x64 Job completed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline is pending approval
builds.sr.ht/freebsd-x64 Job completed
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u shakalnykot:cat2623-shakalnykot
git switch cat2623-shakalnykot

Merge

Merge the changes and update on Forgejo.
git switch master
git merge --no-ff cat2623-shakalnykot
git switch cat2623-shakalnykot
git rebase master
git switch master
git merge --ff-only cat2623-shakalnykot
git switch cat2623-shakalnykot
git rebase master
git switch master
git merge --no-ff cat2623-shakalnykot
git switch master
git merge --squash cat2623-shakalnykot
git switch master
git merge --ff-only cat2623-shakalnykot
git switch master
git merge cat2623-shakalnykot
git push origin master
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/fnott!203
Reference in a new issue
dnkl/fnott
No description provided.
Delete branch "cat2623/fnott:shakalnykot"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?