Fix possible buffer overrun in use of readlink(2)

The man page says:
       readlink() does not append a null byte to buf.  It will truncate
       the contents (to a length of bufsiz characters), in case the
       buffer is too small to hold all of the contents.
[...]
  RETURN VALUE
       On success, these calls return the number of bytes placed in buf.

So we need to pass size-1 so we'll have room for the NUL byte at the
end.

Change-Id: I9ccfb451f8dbe39bc1786864fbd4d0f018598e00
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>