diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2026-02-22 15:08:10 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2026-02-22 15:08:10 +0100 |
| commit | e3cae83a947f5724ec907643221bb0ea040b04e6 (patch) | |
| tree | ee51f2eba1b754352722e02735ef0d9f3f9378a9 | |
| parent | chore(dmenu): sync with upstream (diff) | |
| download | suckless-setup-e3cae83a947f5724ec907643221bb0ea040b04e6.tar.gz | |
chore(slstatus): sync with upstream
Commits:
- wifi: always retry ioctl for ifindex (4f61bbb)
- fix buffer overflow in battery state parsing (98769df)
| -rw-r--r-- | slstatus/components/battery.c | 4 | ||||
| -rw-r--r-- | slstatus/components/wifi.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/slstatus/components/battery.c b/slstatus/components/battery.c index 1c753f9..f2dc393 100644 --- a/slstatus/components/battery.c +++ b/slstatus/components/battery.c @@ -62,7 +62,7 @@ { "Not charging", "o" }, }; size_t i; - char path[PATH_MAX], state[12]; + char path[PATH_MAX], state[13]; if (esnprintf(path, sizeof(path), POWER_SUPPLY_STATUS, bat) < 0) return NULL; @@ -81,7 +81,7 @@ { uintmax_t charge_now, current_now, m, h; double timeleft; - char path[PATH_MAX], state[12]; + char path[PATH_MAX], state[13]; if (esnprintf(path, sizeof(path), POWER_SUPPLY_STATUS, bat) < 0) return NULL; diff --git a/slstatus/components/wifi.c b/slstatus/components/wifi.c index 23af201..8b33baa 100644 --- a/slstatus/components/wifi.c +++ b/slstatus/components/wifi.c @@ -110,10 +110,10 @@ } if (strcmp(ifr.ifr_name, interface) != 0) { strcpy(ifr.ifr_name, interface); - if (ioctl(ifsock, SIOCGIFINDEX, &ifr) != 0) { - warn("ioctl 'SIOCGIFINDEX':"); - return -1; - } + } + if (ioctl(ifsock, SIOCGIFINDEX, &ifr) != 0) { + warn("ioctl 'SIOCGIFINDEX':"); + return -1; } return ifr.ifr_ifindex; } |
