]> granicus.if.org Git - strace/commitdiff
Fix array size calculation in previous commit
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 15 Mar 2012 17:11:51 +0000 (18:11 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 15 Mar 2012 17:11:51 +0000 (18:11 +0100)
* pathtrace.c (getfdpath): Fix array size calculation.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
pathtrace.c

index ab2c69f29614a3fd54bb9a1ab1ea34d038265f19..d50b268f203e75c2ed9a638319a69a741bed7fda 100644 (file)
@@ -110,7 +110,7 @@ const char *
 getfdpath(struct tcb *tcp, int fd)
 {
        static char path[PATH_MAX+1];
-       char linkpath[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)];
+       char linkpath[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)*3];
        ssize_t n;
 
        if (fd < 0)