Use PATH_MAX instead of NAME_MAX
authorAndrew Waterman <waterman@cs.berkeley.edu>
Sat, 10 Jan 2015 01:41:43 +0000 (17:41 -0800)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Sat, 10 Jan 2015 01:41:43 +0000 (17:41 -0800)
spike_main/xspike.cc

index 4331dbe5e94cb9a6f4d14cce597107cc837eb177..f8c8ca7e3e9b4cf31da88e606b908c01259bb476 100644 (file)
@@ -90,7 +90,7 @@ static pid_t fork_xterm(int* tty_fd)
     return -1;
   }
 
-  char tty[NAME_MAX];
+  char tty[PATH_MAX];
   ssize_t ttylen = read(fds[0], tty, sizeof(tty));
   if (ttylen <= 1 || tty[ttylen-1] != '\n')
     return -1;