fuser: a bit of safety in scanf
authorDenis Vlasenko <vda.linux@googlemail.com>
Sat, 12 Jul 2008 09:32:38 +0000 (09:32 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sat, 12 Jul 2008 09:32:38 +0000 (09:32 -0000)
procps/fuser.c

index d8005b568dd88033ce77eb3cacf7a5d1938b476b..ca7c7e267fae3c52d6ddf641252c1fddd1d438a1 100644 (file)
@@ -114,7 +114,7 @@ static inode_list *scan_proc_net(const char *proto,
                return ilist;
 
        while (fgets(line, MAX_LINE, f)) {
-               char addr[64];
+               char addr[68];
                if (sscanf(line, "%*d: %64[0-9A-Fa-f]:%x %*x:%*x %*x %*x:%*x "
                                "%*x:%*x %*x %*d %*d %llu",
                                addr, &tmp_port, &uint64_inode) == 3