diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2021-09-01 08:00:00 +0000 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2021-09-17 14:04:12 +0200 |
commit | b0f95e3954f85d97a99f8a08645418945484dbca (patch) | |
tree | 8c25a6ae4b1ef9277ad6cbbb3fcb91dfd2444055 /quotasys.c | |
parent | 100b8a8814152ca6f52564cb65f33bf7cf033c22 (diff) |
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>
Diffstat (limited to 'quotasys.c')
0 files changed, 0 insertions, 0 deletions