gdb/
[deliverable/binutils-gdb.git] / gdb / nbsd-nat.c
index 14b562f140f84166ac06030427b1f9f08208feae..7f5df6611abaea6eb6719f218369796ada9739c9 100644 (file)
@@ -34,7 +34,7 @@ nbsd_pid_to_exec_file (int pid)
   char *path;
 
   path = xstrprintf ("/proc/%d/exe", pid);
-  if (readlink (path, buf, MAXPATHLEN) == -1)
+  if (readlink (path, buf, MAXPATHLEN - 1) == -1)
     {
       xfree (buf);
       buf = NULL;
This page took 0.02611 seconds and 4 git commands to generate.