Skip to content

filePath buffer is to small to store path like /sys/class/power_supply/ucsi-source-psy-USBC000:001/type #15

@12101111

Description

@12101111

After upgrade to 3.0.0, htop can't open in my laptop and just print htop: No such file or directory.
I use bisect to find out 1886117 cause this issue.
This commit is ok but const char filePath[50]; is too small to store /sys/class/power_supply/ucsi-source-psy-USBC000:001/type which is 57 bytes without \0.
Changing the buffer size to 70 can fix this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions