all repos — slstatus @ 94e87eb8baaf1c20d02602ba3d01bc1babdb2e35

my build of slstatus (tools.suckless.org/slstatus/)

wifi_essid: add boundary check && prevent the use of direct string literal as a format string in snprintf()
raiz raiz@firemail.cc
Tue, 27 Dec 2016 20:14:45 +0300
commit

94e87eb8baaf1c20d02602ba3d01bc1babdb2e35

parent

11fec4fa9501bd20aace72235c4525dc87d5d281

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M slstatus.cslstatus.c

@@ -717,7 +717,8 @@ struct iwreq wreq;

memset(&wreq, 0, sizeof(struct iwreq)); wreq.u.essid.length = IW_ESSID_MAX_SIZE+1; - sprintf(wreq.ifr_name, iface); + snprintf(wreq.ifr_name, ifrn_name, "%s", iface); + if (sockfd == -1) { warn("Failed to get ESSID for interface %s", iface); return smprintf("%s", UNKNOWN_STR);