common.c: fix strncat usage

When quota is configured using --enable-werror, gcc -flto fails with
the following diagnostics:

In function 'strncat',
    inlined from 'sstrncat' at common.c:113:2,
    inlined from 'get_proc_num' at quotastats.c:46:2:
/usr/include/bits/string_fortified.h:122:10: error: '__builtin___strncat_chk' specified bound 4096 equals destination size [-Werror=str
ingop-overflow=]
  122 |   return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
      |          ^

This diagnostics is correct: when "src" contains "len" or more bytes,
strncat() writes "len"+1 bytes to "dest" ("len" from "src" plus
the terminating null byte).

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Jan Kara <jack@suse.cz>
1 file changed