From: albert <> Date: Sat, 7 Dec 2002 00:39:05 +0000 (+0000) Subject: %3s and %31s X-Git-Tag: v3.3.0~316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7439aa80ce13be691e8f42667da8d43b9b4fa1d6;p=procps-ng %3s and %31s --- diff --git a/top.c b/top.c index fab1d0e5..bd6e9a3f 100644 --- a/top.c +++ b/top.c @@ -1219,7 +1219,7 @@ static int rc_read_new (const char *const buf, RCF_t *rc) { for (i = 0; i < GROUPSMAX; i++) { RCW_t *ptr = &rc->win[i]; - cnt = sscanf(cp, "%s\tfieldscur=%s\n", ptr->winname, ptr->fieldscur); + cnt = sscanf(cp, "%3s\tfieldscur=%31s\n", ptr->winname, ptr->fieldscur); if (cnt != 2) return 5+100*i; // OK to have less than 4 windows if (WINNAMSIZ <= strlen(ptr->winname)) return -6; if (strlen(DEF_FIELDS) != strlen(ptr->fieldscur)) return -7;