You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.
rkt-1.30.0 with lkvm stage1: builtin-run.c:412:28: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 4091 [-Werror=format-truncation=]
#3966
Open
devurandom opened this issue
Dec 15, 2018
· 1 comment
builtin-run.c: In function ‘kvm_run_write_sandbox_cmd.isra.1’:
builtin-run.c:412:28: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 4091 [-Werror=format-truncation=]
snprintf(dst, len, "/host%s", resolved_path);
^~ ~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
from include/kvm/util.h:13,
from include/kvm/builtin-run.h:4,
from builtin-run.c:1:
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 6 and 4101 bytes into a destination of size 4096
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
virtio/net.c: In function ‘virtio_net__tap_init’:
virtio/net.c:365:47: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
strncpy(ifr.ifr_name, ndev->tap_name, sizeof(ndev->tap_name));
^
virtio/net.c:377:47: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
strncpy(ifr.ifr_name, ndev->tap_name, sizeof(ndev->tap_name));
^
cc1: all warnings being treated as errors
The text was updated successfully, but these errors were encountered:
What did you do?
I am trying to build rkt-1.30.0 on Gentoo.
What did you expect to see?
Successful build.
What did you see instead?
I patched that using rkt-1.30.0-fix-lkvm-resolve-program-snprintf.patch, but afterwards ran into the next error:
The text was updated successfully, but these errors were encountered: