/* Native-dependent code for NetBSD.
- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
This file is part of GDB.
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;