mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 04:54:37 +03:00
Linux: add reset to heuristic
On hard to parse command lines tokenStart might be computed to be bigger than tokenEnd. Reset both values in such cases.
This commit is contained in:

committed by
cgzones

parent
550a141860
commit
c408add108
@ -1123,6 +1123,13 @@ static bool LinuxProcessList_readCmdlineFile(Process* process, openat_arg_t proc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Some command lines are hard to parse, like
|
||||
* file.so [kdeinit5] file local:/run/user/1000/klauncherdqbouY.1.slave-socket local:/run/user/1000/kded5TwsDAx.1.slave-socket
|
||||
* Reset if start is behind end.
|
||||
*/
|
||||
if (tokenStart >= tokenEnd)
|
||||
tokenStart = tokenEnd = 0;
|
||||
}
|
||||
|
||||
if (tokenEnd == 0) {
|
||||
|
Reference in New Issue
Block a user