mount: nfs_strerror's static buffer was bigger than needed.
authorDenis Vlasenko <vda.linux@googlemail.com>
Sun, 17 Sep 2006 15:06:34 +0000 (15:06 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sun, 17 Sep 2006 15:06:34 +0000 (15:06 -0000)
util-linux/mount.c

index 5539f1e0200e44fc09c7882eecd713b9bf3f9422..57d2d04308781cfe8f8cf169fc1865ba28d824dd 100644 (file)
@@ -515,7 +515,7 @@ static const struct {
 static char *nfs_strerror(int status)
 {
        int i;
-       static char buf[256];
+       static char buf[sizeof("unknown nfs status return value: ") + sizeof(int)*3];
 
        for (i = 0; nfs_errtbl[i].stat != -1; i++) {
                if (nfs_errtbl[i].stat == status)