Summary: | Tab title is incorrect, appears to incorrectly parse /proc/$PID/stat for the name of a process | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Clayton Townsend II <clayton> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | clayton |
Priority: | NOR | ||
Version: | 23.04.1 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/konsole/-/commit/48523348d9e1c1b2c559314c84372ebe41312638 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | observed result of a incorrectly parsed executable |
Description
Clayton Townsend II
2023-05-21 01:45:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/872 Git commit 48523348d9e1c1b2c559314c84372ebe41312638 by Kurt Hindenburg, on behalf of Theodore Wang. Committed on 12/08/2023 at 09:04. Pushed by hindenburg into branch 'master'. Resolve parsing issues for certain process names to fix incorrect tab titles Valid file names for executables can contain '(', ')' or ' '. Some odd but legal executable names include "a) (b", "(a" and "b)". The above examples will lead to incorrect tab titles due to incorrect parsing of the tab names. This change finds the index of the last character of the name field by searching for the last occurence of ')'. The search encompasses a range of 16 characters starting from the starting index of the name field. This change relies on the field in /proc/%pid/stat containing the name of the process to start with '(' and ends with ')'. It also relies on the fact that the maximum length of the name of a process is 16 characters. Lastly, it relies on the rest of the contents of /proc/%pid/stat not containing parentheses. M +8 -8 src/ProcessInfo.cpp https://invent.kde.org/utilities/konsole/-/commit/48523348d9e1c1b2c559314c84372ebe41312638 |